I'm not entirely sure why (perhaps CF is counting 20 million seconds)
but if you punctuate the date, eg 2007/09/27, it works.
--Ben Doom
Orlini, Robert wrote:
> I tried: #dateformat(DATEADD("m",-1,enddate),"YYYYMMDD")#
>
> If enddate is 20070927: I get: 568511220 as the output
>
> How can I get 20070827. I don't weant to use the now()) function because the
> enddate can be any day not just today.
>
> Thx.
>
>
> -----Original Message-----
> From: Tom Chiverton [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 27, 2007 11:48 AM
> To: CF-Talk
> Subject: Re: minus 30
>
>
> On Thursday 27 Sep 2007, [EMAIL PROTECTED] wrote:
>> <CFIF #get.enddate# eq #dateformat(dateAdd("m",-1,now()),"YYYYMMDD")#>
>
> Note this subtracts a month (so March 28 becomes Feb 28), which is not the
> same thing as subtracting 30 days.
> I'm not sure what it does if you try and subtract one month from March 30th
> though.
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta
Archive:
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:289679
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4