First the date is in mm/dd/yyyy format
and 3 represents 1st quarter so adding another 1 quarter results in 6..

by the way a quarter is 3 months.


----- Original Message -----
From: "Lee Fuller" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, July 28, 2001 11:07 AM
Subject: DateAdd Strangeness? (Or is it me?)


> Try this...
>
> <cfset nextq = #month(dateadd("q", 1, now()))#>
>
> <cfoutput>
> #nextq#
> </cfoutput>
>
> You should get (if you try this in July) the month returned as "10"...
> No problem.
>
> However.. Try this...
>
> <cfset newdate = "3/5/2001">
> <cfset nextq = #month(dateadd("q", 1, newdate))#>
>
> <cfoutput>
> #nextq#
> </cfoutput>
>
> And you get the month returned as "6".  Huh??  I thought quarters were
> January, April, July and October?  How does one get a "6" as the first
> month in a quarter?
>
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Structure your ColdFusion code with Fusebox. Get the official book at 
http://www.fusionauthority.com/bkinfo.cfm
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to