Does anybody know a simple method to get a date- month.year-from a number month int(4)
Thank you
date from month -int (4)
Moderators: chulett, rschirm, roy
date from month -int (4)
ovidiu
There is no single builtin function in PX to let you do this. You will need to convert your Month number (based on what first month?) into an actual date and then use the [bold]DateFromDaysSince[/bold] to get a number of date using a average of 30 days/month, or use 29 and accept a possible error on rounding down if there are more than 31 months between the two dates. Correct would be to write your own offset math working on the yy and mm initial values, adding your months and wrapping after month 12 and adding 1 to the year. Finally, putting the new yy and mm values together with a day of 1 to get a value which can be converted to date format.
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Convert the number to a string, add a day number (such as "01") in the appropriate location for your date format, then use a string to date conversion function.
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.