Ya, for that you'd have to use the code I posted. (without the hashes, yuk
yuk)

On Thu, Apr 2, 2009 at 11:37 AM, Ras Tafari <[email protected]> wrote:

>
> but i have an application where clients can say "i want to run this
> report monthly, and start on this day, at end on this day"
> and then next month, increment those dates by a Month, not by 30 days
> or whatever... yanno?
>
> ras
>
> On Thu, Apr 2, 2009 at 11:35 AM, Michael Grant <[email protected]> wrote:
> >
> > I see the confusion. The problem is that "month" isn't really a value you
> > should use when doing any kind of date comparison because it ranges from
> 28
> > to 31 as a value. In my experience you should always use days or weeks
> when
> > constructing dates since they are always constant values. 1 week always =
> 7
> > days etc.
> >
> > On Thu, Apr 2, 2009 at 11:23 AM, Ras Tafari <[email protected]> wrote:
> >
> >>
> >> look closely, its not.
> >> months that have less than november 2008 increment fine, others go to
> >> the ceiling of 30 days like nov has
> >>
> >> #fail
> >>
> >> On Thu, Apr 2, 2009 at 11:16 AM, Michael Grant <[email protected]> wrote:
> >> >
> >> > Not sure what the problem is you are seeing. It's incrementing by a
> >> month.
> >> >
> >> >
> >> > On Thu, Apr 2, 2009 at 11:09 AM, Tony <[email protected]> wrote:
> >> >
> >> >>
> >> >>        <cfset date1 = '11/30/2008' />
> >> >>       <cfoutput>
> >> >>               <cfloop from=1  to=6 index = i>
> >> >>                       <cfset date2 = dateAdd('m', i, date1) />
> >> >>                       #dateFormat(date2,'mm/dd/yyyy')#
> >>  <br
> >> >> />
> >> >>               </cfloop>
> >> >>       </cfoutput>
> >> >>
> >> >> very simple code.  however, its behaving like i dont want it to.
> >> >> id rather see it increment by a MONTH, not same day next month.
> >> >>
> >> >> the output of that code above is:
> >> >>
> >> >> 12/30/2008
> >> >> 01/30/2009
> >> >> 02/28/2009
> >> >> 03/30/2009
> >> >> 04/30/2009
> >> >> 05/30/2009
> >> >>
> >> >> and i would rather it be....
> >> >>
> >> >> 12/31/2008
> >> >> 1/31/2009
> >> >> 2/28/2009
> >> >> 3/31/2009
> >> >> 4/30/2009
> >> >> 5/31/2009
> >> >>
> >> >> what should i be using? this is weird... i supply "m" to get month
> >> >> increment, but
> >> >> no dice...
> >> >>
> >> >> thanks
> >> >> tw
> >> >>
> >> >>
> >> >
> >> >
> >>
> >>
> >
> >
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:293717
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to