How do I add 2 years to a date in powerbuilder and account for the leap year correctly?

Posted by Judy on Stack Overflow See other posts from Stack Overflow or by Judy
Published on 2010-01-05T20:57:46Z Indexed on 2010/05/04 0:58 UTC
Read the original article Hit count: 307

Filed under:
|

How do I add 2 years to a date in powerbuilder and account for the leap year correctly?

We have a medical license application where the user would like the date to go expire two years. Current license date is 7/10/2010 and expire date should be 7/2/2012 I used relative date and added 729 if not a leap year and 730 if it was but that is messy.

I wish the relativedate function took another parameter to so you could pass in number years.

© Stack Overflow or respective owner

Related posts about leap-year

Related posts about powerbuilder