Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

same date but 1 month after 2

Status
Not open for further replies.

budich

Programmer
Oct 7, 2000
79
ID
Hi Guys,

Does anyone know how to make a function for calculate a date with a function so the result is a same date but in the next month. Lets i make example :
I have a field date 27 february 2001 and I want make a function that can make a result in another field as 27 March 2001. Of course, I cannot just add [date]+30 because the sum of the day in every month not all same.
Thank you in advance
regards
Budi
 
I think the DateAdd function should do this for you:


NewDate = DateAdd("m", 1, OrderDate)


The "m" says add some months.

The 1 says how many.


 
Dim a As Date
a = Date
a = DateAdd("m", 1, a)
John Fill
ivfmd@mail.md
 
Dear John and Hellferret,

Thank you for your helpfull threads, it is work!
see you
Budi
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top