Use dateadd with -1 for the month instead of -30 for the day.

..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com


-----Original Message-----
From: Orlini, Robert [mailto:[EMAIL PROTECTED] 
Sent: Thursday, September 27, 2007 11:24 AM
To: CF-Talk
Subject: minus 30

Hi,

How can I subtract one month (30 days) from a value?

The coding I have is: 

<CFIF #get.enddate# eq #dateformat(now(),"YYYYMMDD")#> Yes <cfelse> NO
</CFIF> 

and they equal Yes all the time.

Both these values check out OK and appear as: 20070927 But I need the
#dateformat(now(),"YYYYMMDD")#> to go back one month I tried <CFSET expire =
#dateformat(now(),"YYYYMMDD")#> and then #DateAdd("d", -30, expire)# but it
displays as {ts '56852-03-30 00:00:00'} Thanks in advance.
Robert O.
HWW





~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
ColdFusion is delivering applications solutions at at top companies 
around the world in government.  Find out how and where now
http://www.adobe.com/cfusion/showcase/index.cfm?event=finder&productID=1522&loc=en_us

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289651
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to