Page 1 of 1

Can't Get Person's Age Using DateDifference

Posted: June 23rd, 2022, 12:05 pm
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

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

Posted: August 30th, 2022, 3:37 pm
by JustinVanRegenmorter
The following units have been added to the Date Difference service in DesignTime Revision 2359 and RunTime Revision 1019
  • Weeks
  • Months
  • Years