1 month is fine.
enddate is 20070927 (for now) and is a string: I get: 568511220 as the output
-Original Message-
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 27, 2007 2:12 PM
To: CF-Talk
Subject: Re: minus 30
Do you want 30 days, or 1 month
Subject: RE: minus 30
1 month is fine.
enddate is 20070927 (for now) and is a string: I get: 568511220 as the
output
-Original Message-
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 27, 2007 2:12 PM
To: CF-Talk
Subject: Re: minus 30
Do you want 30 days, or 1
Hi,
How can I subtract one month (30 days) from a value?
The coding I have is:
CFIF #get.enddate# eq #dateformat(now(),MMDD)#
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(),MMDD)# to go
CFIF #get.enddate# eq #dateformat(dateAdd(m,-1,now()),MMDD)#
(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
On Thursday 27 Sep 2007, [EMAIL PROTECTED] wrote:
CFIF #get.enddate# eq #dateformat(dateAdd(m,-1,now()),MMDD)#
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
I'm not sure what it does if you try and subtract one month from
March 30th though.
In CF 7 is gives Feb 28
Andrew
-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
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
://acoderslife.com
-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()),MMDD)#
Note this subtracts
That did it!
Thanks Jerry and thanks all others for thier input. I got a little from each...
-Original Message-
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 27, 2007 11:31 AM
To: CF-Talk
Subject: Re: minus 30
CFIF #get.enddate# eq #dateformat(dateAdd(m,-1
11:31 AM
To: CF-Talk
Subject: Re: minus 30
CFIF #get.enddate# eq #dateformat(dateAdd(m,-1,now()),MMDD)#
(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]
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()),MMDD)#
Note this subtracts a month (so March 28 becomes Feb 28), which is not the
same thing
the endate is
9/1/2007...how can I subtract 30 days from that? That's where I got:
#DateAdd(d, -30, enddate)#.
-Original Message-
From: Jerry Johnson [mailto:[EMAIL PROTECTED]
Sent: Thursday, September 27, 2007 11:31 AM
To: CF-Talk
Subject: Re: minus 30
CFIF #get.enddate# eq
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
13 matches
Mail list logo