Can't Get Person's Age Using DateDifference

This forum allows users to post and respond to "How Do I Do ....." questions. The information contained in this forum has not been validated by K-Rise Systems and, as such, K-Rise Systems cannot guarantee the accuracy of the information.
Post Reply
JefferyD
Posts: 177
Joined: August 31st, 2021, 11:37 am
Contact:

Can't Get Person's Age Using DateDifference

Unread post by JefferyD »

The DateDifference service works with units from milliseconds to days, but it lacks month and year units. This is unfortunate as months and years are the units most complicated to convert values to and from.

As decimal points are not as valuable for years and months though, maybe some way to get the remainder in days could be more useful instead.

Potential Suggestions
  1. "TotalYears" and "TotalMonths"
    • Example: Instead of 2.5 years, it could be 2y183.0d for 2 years and 183.0 total days into the year. Parsing needed by developer.
  2. "YearRemainderInTotalDays" and "MonthRemainderInTotalDays"
    • Example: Instead of 2.5 years, it could just be 183.0 days into the year. "Years" unit must be used separately with the same inputs to get the 2 years.
image.png

Additionally, adding months and years would make it more consistent with the units available in the AddSubtractDuration service.
image.png
word count: 144

Tags:
JustinVanRegenmorter
Posts: 517
Joined: August 26th, 2021, 9:56 am
Contact:

Re: Can't Get Person's Age Using DateDifference

Unread post by JustinVanRegenmorter »

The following units have been added to the Date Difference service in DesignTime Revision 2359 and RunTime Revision 1019
  • Weeks
  • Months
  • Years
word count: 22
Post Reply