Re: DaysInMonth issue

2011-03-01 Thread Dan G. Switzer, II

I suspect the actual issue is that the script is running after midnight in
whatever timezone his servers in.

So, instead of getting 28 for February, he's getting 31 for March.

-Dan

On Tue, Mar 1, 2011 at 11:27 AM, Robert Harrison  wrote:

>
> Have you tried doing IsDate against your value to see if the value you are
> trying to feed to it is a date and not just a string that seems to look like
> a date?
>
> Try validating with IsDate and if it return false try rebuilding as a real
> date with CreateDate.
>
>
> Robert B. Harrison
> Director of Interactive Services
> Austin & Williams
> 125 Kennedy Drive, Suite 100
> Hauppauge NY 11788
> P : 631.231.6600 Ext. 119
> F : 631.434.7022
> http://www.austin-williams.com
>
> Great advertising can't be either/or.  It must be &.
>
> Plug in to our blog: A&W Unplugged
> http://www.austin-williams.com/unplugged
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342655
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DaysInMonth issue

2011-03-01 Thread Robert Harrison

Have you tried doing IsDate against your value to see if the value you are 
trying to feed to it is a date and not just a string that seems to look like a 
date?

Try validating with IsDate and if it return false try rebuilding as a real date 
with CreateDate.


Robert B. Harrison
Director of Interactive Services
Austin & Williams
125 Kennedy Drive, Suite 100 
Hauppauge NY 11788
P : 631.231.6600 Ext. 119 
F : 631.434.7022
http://www.austin-williams.com 

Great advertising can't be either/or.  It must be &.

Plug in to our blog: A&W Unplugged
http://www.austin-williams.com/unplugged



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342654
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


re: DaysInMonth issue

2011-03-01 Thread Jason Fisher

Nope, when I do #daysInMonth(createDate(2010, 2, 1))# it returns '28' 
correctly.  


You would get '31' for #daysInMonth(createDate(2010, 1, 2))#, though, I 
suppose.



From: "Jeff Epstein" 
Sent: Tuesday, March 01, 2011 11:13 AM
To: "cf-talk" 
Subject: DaysInMonth issue

I just had a failure of the DaysInMonth function. For a report running on 
February data, "from" 2010-02-("01" hardcoded), "to" being DaysInMonth, the 
date result was "2010-02-31"!!

I had to hard-code "2010-02-28" as "to" to make the report work. 

Anybody else having February problems today with DaysInMonth?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342653
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DaysInMonth issue

2011-03-01 Thread Azadi Saryev

well, it's March 2nd already here in Hong Kong, but nonetheless:
if you had it as daysinmonth(now()), then today being March 1st it would 
have correctly returned 31...

what exactly did you pass as argument to your daysinmonth() ?

Azadi

On 02/03/2011 00:05 , Jeff Epstein wrote:
> I just had a failure of the DaysInMonth function. For a report running on 
> February data, "from" 2010-02-("01" hardcoded), "to" being DaysInMonth, the 
> date result was "2010-02-31"!!
>
> I had to hard-code "2010-02-28" as "to" to make the report work.
>
> Anybody else having February problems today with DaysInMonth?
>
>
>
> 

~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342652
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DaysInMonth issue

2011-03-01 Thread Matt Quackenbush

I think we'll need to see more code before we can be of much help.  But in
the meantime, if you're running DaysInMonth() today, March 1st, I would
totally expect it to return "31".


~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342651
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


DaysInMonth issue

2011-03-01 Thread Jeff Epstein

I just had a failure of the DaysInMonth function. For a report running on 
February data, "from" 2010-02-("01" hardcoded), "to" being DaysInMonth, the 
date result was "2010-02-31"!!

I had to hard-code "2010-02-28" as "to" to make the report work. 

Anybody else having February problems today with DaysInMonth?



~|
Order the Adobe Coldfusion Anthology now!
http://www.amazon.com/Adobe-Coldfusion-Anthology/dp/1430272155/?tag=houseoffusion
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:342650
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm