Adding 365 days to date field

Meeting place for R&R customers and clients to share tips and ideas. Post your questions, messages or problems here.
Post Reply
vandeboy
Posts: 2
Joined: Tue Oct 10, 2017 12:44 pm

Adding 365 days to date field

Post by vandeboy » Thu Sep 15, 2011 5:51 pm

My SQL database has a date field named _RenewalDate_ and I need some help creating calculation field so that if the _RenewalDate_ is less then _Today_s_ date the report will print the _RenewalDate_ + 365

philpaul
Posts: 2
Joined: Tue Oct 10, 2017 12:44 pm

=> RE: Adding 365 days to date field

Post by philpaul » Fri Sep 16, 2011 10:02 am

You might try something like this:____iif(RenewalDate<DATE(),ADDYRS(RenewalDate,1),RenewalDate)____I used "ADDYRS" instead of using "RenewalDate + 365" because some years (leap years) have 364 days.____- Phil

Post Reply