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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DateAdd('m', -12, now()) doesn't work ?

Status
Not open for further replies.

okiiyama

IS-IT--Management
Joined
Jan 3, 2003
Messages
269
Location
US
This is strange, I don't work with the server, I just do coding, but DateAdd('m', -12, now()) worked yesterday, and today it doesn't work. To fix it I am now using

Code:
DateAdd('y', -1, now())

But it seems strange that a server upgrade, or what ever it is wouldn't support both ways.
 
I'd say Leap Year or DST might be causing the problem

The 1 year setup is better anyway..

Though you can say..

#(Year(Now()) - 1)#

ALFII.com
---------------------
If this post answered or helped to answer your question, please reply with such so that forum members with a similar question will know to use this advice.
 
just curious... what do you mean "doesn't work"? you get an error, unexpected results, what?

A common mistake that people make when trying to design something completely foolproof is to underestimate the ingenuity of complete fools.
-Douglas Adams (1952-2001)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top