System Date -15 Years
Moderators: chulett, rschirm, roy
System Date -15 Years
I want to a compare of date (yyyy-mm-dd) with system date -15 years in Transformer in px. What functions should i use.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Depends how accurately you need it. You could use DateFromDaysSince() if you're happy to say that 15 years is 5479 days. Otherwise you need to break the date into its components, using YearFromDate(), MonthFromDate() and DayFromDate(), subtract 15 from the year component, re-assemble the date, subtracting 1 from the day if the date is Feb 29, using DateFromString(). The integers will cast implicitly to strings.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.