<CFIF #get.enddate# eq #dateformat(dateAdd("m",-1,now()),"YYYYMMDD")#>

(you need to do the dateAdd, and then do the dateFormat, and then do
the compare).

(you can also look at dateCompare rather than the eq, if you want)

On 9/27/07, Orlini, Robert <[EMAIL PROTECTED]> wrote:
> 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 8 - Build next generation apps
today, with easy PDF and Ajax features - download now
http://download.macromedia.com/pub/labs/coldfusion/cf8_beta_whatsnew_052907.pdf

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

Reply via email to