Don't forget, some fiscal years start and end in February. Therefore, fiscal
1Q 2001 would be Feb-Apr.

----- Original Message -----
From: "Lee Fuller" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Saturday, July 28, 2001 2:46 PM
Subject: RE: DateAdd Strangeness? (Or is it me?) --it's you!!


> Yes.. But... (isn't there always one?? ;)
>
> You're correct.. Except that a "Quarter", when used in calendar terms,
> means Jan-Mar, Apr-Jun, Jul-Sep, and Oct-Dec.  So by using the first
> test, with "now()" as the date it answers correctly.  However, when
> using a random date, it does not... It simply adds 3 months.
>
> Maybe it's just me assuming that "quarter" is for "calendar quarter".
> But when someone says "Q1 2001".. We all assume they mean Jan-Mar of
> 2001.  And if you add 1 to the Q1, you get Q2, which is Apr-Jun of 2001.
>
> Oddly enough.. If you use "Quarter(now())" it returns the number based
> on calendar quarters.  So if you're trying to modify a date to get the
> next "calendar" quarter.. It would be simple to use the dateadd to add a
> quarter and voila!  But.. Sadly it doesn't work that way.  :(
>
>
>
> > -----Original Message-----
> > From: Saro [mailto:[EMAIL PROTECTED]]
> > Sent: Saturday, July 28, 2001 11:27 AM
> > To: CF-Talk
> > Subject: Re: DateAdd Strangeness? (Or is it me?) --it's you!!
> >
> >
> > 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