Data calc

I need to take a date inputed by the user and substract that date up to 24 months.  The Database has the dates as 01/01/00, we were planning to enter it the same way.  But I am open the requirement is to be able to take the end date the user input and subtract up to 24 months for the start dated of the search.  So what I am looking for is ideas to achive this in code.
akeyesAsked:
Who is Participating?
 
mcriderConnect With a Mentor Commented:
You can also do this:

x=dateadd("m",-24,"01/01/00") 'will return the date 1/1/98

Cheers!®©
0
 
mcriderCommented:
Using the DateAdd function, you can add and subtract time intervals from dates...

For example, this adds 1 month to now:   dateadd("m",1,now)

This subtracts 1 month from now:  dateadd("m",-1,now)


Cheers!®©
0
 
akeyesAuthor Commented:
Thank you, I knew it was something simple.  I just could not for the life of me find it.
0
 
mcriderCommented:
Thanks for the points! Glad I could help!


Cheers!®©
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.