Re: DateDiff Weirdness/Possible bug

2011-06-09 Thread Paul Hastings

On 6/10/2011 11:43 AM, Ruslan Sivak wrote:
> 

1st off pretty sure s won't work, DateDiff('s','1/1/1970','6/1/2011') is the 
correct syntax.

> I get 1306882800.

actually i get 1306886400, my server is in ICT timezone (tz) there's no DST 
here.

if i do

createDate(2011,6,1).getTime();

i get 130686120 ms as the epoch offset.

all datetimes in cf are in cf's tz. so i guess you're in tz hell.

are the sql & cf servers in the same tz?



~|
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:345143
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff Weirdness/Possible bug

2011-06-09 Thread Paul Hastings

On 6/10/2011 12:02 PM, William Seiter wrote:
>
> It looks like the times are off by 1 hour.  Did you check your server's
> clocks to make sure they are both set to the same time?

not relevant, he's creating the datetimes, not using now().

~|
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:345142
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DateDiff Weirdness/Possible bug

2011-06-09 Thread William Seiter

It looks like the times are off by 1 hour.  Did you check your server's
clocks to make sure they are both set to the same time?



-Original Message-
From: Ruslan Sivak [mailto:cfli...@ruslansivak.com] 
Sent: Thursday, June 09, 2011 9:43 PM
To: cf-talk
Subject: DateDiff Weirdness/Possible bug


I'm having trouble with different results for DateDiff between CF and SQL
Server.  I'm guessing it has something to do with DST, but it seems that CF
is doing it wrong.

Doing a SQL Query like this:

select DateDiff(s,'1/1/1970','6/1/2011') as datediff

I get 1306886400.

Doing



I get 1306882800.

Converting SQL's result back to Date using CF:

#dateAdd('s',1306886400,'1/1/1970')#

I get  {ts '2011-06-01 01:00:00'}

According to http://www.epochconverter.com/, 1306886400 is the correct
number of seconds for midnight on June 1st, 2011.

Is there a reason that CF is returning the wrong number of seconds?

Russ




~|
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:345141
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-14 Thread Andrew Scott

Dan,

There is actually 48 seconds...

@Brad - I am not sure what you are trying to do, but you might consider
doing the diff on seconds and converting it to the number of days, minutes
seconds etc by calculating this. Plenty of examples how to turn seconds into
mins, hours, days etc.


On Thu, Apr 15, 2010 at 1:49 PM, Dan G. Switzer, II  wrote:

>
> Brad,
>
> On Tuesday, April 13, 2010, Bradley Stone  wrote:
> >
> > All:
> >
> > Feeding DateDiff() dates which are more than 24 hours apart yields
> minutes:
> >
> > 
> > #DateDiff("n", "2010-04-08 19:41:36.0", "2010-04-12 19:10:34.0")#
> > 
> >
> > Result: 5728
> >
> > However, feeding DateDiff() dates which are LESS than 24 hours apart
> yields nothing:
> >
> > 
> > #DateDiff("n", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#
> > 
> >
> > Result: 0
>
> There's only 13 seconds between those two dates, so zero is the
> correct response.
>
> -Dan
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332902
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-14 Thread James Holmes

Can't you just use seconds, since the difference is under a minute?


#DateDiff("s", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#


mxAjax / CFAjax docs and other useful articles:
http://www.bifrost.com.au/blog/


On 14 April 2010 00:08, Bradley Stone  wrote:

>
> Thanks guys. I think the problem is that that I was thinking that the
> function could function when the arguments are essentially the same day.
>  Here's what I did to solve the problem: when the function returns 0, do
> this:
>
> 
>  DatePart("h", arguments.LowDate))>
>
>  DatePart("n", arguments.LowDate))
>
> Results in (HH:MM) Format: #holdTotalHours#:#holdTotalMinutes#
> 
>
> Using DatePart here seems to work fine!
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332901
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-14 Thread Dan G. Switzer, II

Brad,

On Tuesday, April 13, 2010, Bradley Stone  wrote:
>
> All:
>
> Feeding DateDiff() dates which are more than 24 hours apart yields minutes:
>
> 
> #DateDiff("n", "2010-04-08 19:41:36.0", "2010-04-12 19:10:34.0")#
> 
>
> Result: 5728
>
> However, feeding DateDiff() dates which are LESS than 24 hours apart yields 
> nothing:
>
> 
> #DateDiff("n", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#
> 
>
> Result: 0

There's only 13 seconds between those two dates, so zero is the
correct response.

-Dan

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332900
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DateDiff() and Minutes Wierdness

2010-04-13 Thread brad

> I was thinking that the function could function when the arguments are 
> essentially the same day.

I'm a little confused.  The dateDiff() function DOES work when the
arguments are the same day.  Have we led you to believe otherwise, or
are you talking about a different "function" functioning?

> Here's what I did to solve the problem: when the function returns 0, do this:

Exactly what combination of inputs to dateDiff() is returning zero? If
it is your second example in your original post, then it SHOULD return
zero because the two dates were less than one minute apart.  Your code
below is asking whether or not the two times are in the same "hour" and
"minute" which is a different question than asking how many full hours
and minutes exists between the times.  (It's also worth noting your code
below will ONLY work for times on the same day and with a 24 hour clock)

If your objective is to decide if the times are in the same "minute"
then you should probably always be using datePart() starting with the
largest unit (year) and working in and NOT using dateDiff() at all. 
Alternatively you could continue to use dateDiff() to the second level,
divide by 60, and "ceiling()" the result up to the next full minute
which is essentially what you are doing below.

Perhaps you can explain exactly what you were trying to do.

~Brad








~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332864
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-13 Thread Bradley Stone

Thanks guys. I think the problem is that that I was thinking that the function 
could function when the arguments are essentially the same day.  Here's what I 
did to solve the problem: when the function returns 0, do this:






Using DatePart here seems to work fine!



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332862
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DateDiff() and Minutes Wierdness

2010-04-13 Thread Rick Faircloth

Gotcha...I was thinking his examples were reversed...

-Original Message-
From: Raymond Camden [mailto:rcam...@gmail.com] 
Sent: Tuesday, April 13, 2010 11:55 AM
To: cf-talk
Subject: Re: DateDiff() and Minutes Wierdness


That was his first example, which worked for him. His second example
was less then 60 seconds apart.


On Tue, Apr 13, 2010 at 9:37 AM, Rick Faircloth
 wrote:
>
> Isn't that:
>
> April  8th, 2010 / 19 hours 41 minutes 36 seconds
> April 12th, 2010 / 19 hours 10 minutes 34 seconds
>
> Around 3 days, 28 minutes, 58 seconds apart?
> (No coffee yet, so results may be skewed!)
>
> And what does the first decimal place in "36.0" represent, anyway?
> A tenth of a second?  Never worked with time and decimal places.
>
>
> -Original Message-
> From: Raymond Camden [mailto:rcam...@gmail.com]
> Sent: Tuesday, April 13, 2010 9:09 AM
> To: cf-talk
> Subject: Re: DateDiff() and Minutes Wierdness
>
>
> Um, aren't those times like 50 seconds or so apart? Isn't 50 seconds <
> 1 minute? Therefore 0 "full" minutes?
>
> On Tue, Apr 13, 2010 at 7:32 AM, Bradley Stone  wrote:
>>
>> All:
>>
>> Feeding DateDiff() dates which are more than 24 hours apart yields
> minutes:
>>
>> 
>> #DateDiff("n", "2010-04-08 19:41:36.0", "2010-04-12 19:10:34.0")#
>> 
>>
>> Result: 5728
>>
>> However, feeding DateDiff() dates which are LESS than 24 hours apart
> yields nothing:
>>
>> 
>> #DateDiff("n", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#
>> 
>>
>> Result: 0
>>
>> What am I missing?  Any help appreciated!
>> Brad Stone
>> Benchmark Technologies Inc.
>>
>>
>>
>>
>
>
>
> 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332861
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-13 Thread Raymond Camden

That was his first example, which worked for him. His second example
was less then 60 seconds apart.


On Tue, Apr 13, 2010 at 9:37 AM, Rick Faircloth
 wrote:
>
> Isn't that:
>
> April  8th, 2010 / 19 hours 41 minutes 36 seconds
> April 12th, 2010 / 19 hours 10 minutes 34 seconds
>
> Around 3 days, 28 minutes, 58 seconds apart?
> (No coffee yet, so results may be skewed!)
>
> And what does the first decimal place in "36.0" represent, anyway?
> A tenth of a second?  Never worked with time and decimal places.
>
>
> -Original Message-
> From: Raymond Camden [mailto:rcam...@gmail.com]
> Sent: Tuesday, April 13, 2010 9:09 AM
> To: cf-talk
> Subject: Re: DateDiff() and Minutes Wierdness
>
>
> Um, aren't those times like 50 seconds or so apart? Isn't 50 seconds <
> 1 minute? Therefore 0 "full" minutes?
>
> On Tue, Apr 13, 2010 at 7:32 AM, Bradley Stone  wrote:
>>
>> All:
>>
>> Feeding DateDiff() dates which are more than 24 hours apart yields
> minutes:
>>
>> 
>> #DateDiff("n", "2010-04-08 19:41:36.0", "2010-04-12 19:10:34.0")#
>> 
>>
>> Result: 5728
>>
>> However, feeding DateDiff() dates which are LESS than 24 hours apart
> yields nothing:
>>
>> 
>> #DateDiff("n", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#
>> 
>>
>> Result: 0
>>
>> What am I missing?  Any help appreciated!
>> Brad Stone
>> Benchmark Technologies Inc.
>>
>>
>>
>>
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332860
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DateDiff() and Minutes Wierdness

2010-04-13 Thread Jason Fisher

Yes, the long datetime in SQL Server tracks out to fractions of seconds.



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332858
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


RE: DateDiff() and Minutes Wierdness

2010-04-13 Thread Rick Faircloth

Isn't that:

April  8th, 2010 / 19 hours 41 minutes 36 seconds
April 12th, 2010 / 19 hours 10 minutes 34 seconds

Around 3 days, 28 minutes, 58 seconds apart?
(No coffee yet, so results may be skewed!)

And what does the first decimal place in "36.0" represent, anyway?
A tenth of a second?  Never worked with time and decimal places.


-Original Message-
From: Raymond Camden [mailto:rcam...@gmail.com] 
Sent: Tuesday, April 13, 2010 9:09 AM
To: cf-talk
Subject: Re: DateDiff() and Minutes Wierdness


Um, aren't those times like 50 seconds or so apart? Isn't 50 seconds <
1 minute? Therefore 0 "full" minutes?

On Tue, Apr 13, 2010 at 7:32 AM, Bradley Stone  wrote:
>
> All:
>
> Feeding DateDiff() dates which are more than 24 hours apart yields
minutes:
>
> 
> #DateDiff("n", "2010-04-08 19:41:36.0", "2010-04-12 19:10:34.0")#
> 
>
> Result: 5728
>
> However, feeding DateDiff() dates which are LESS than 24 hours apart
yields nothing:
>
> 
> #DateDiff("n", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#
> 
>
> Result: 0
>
> What am I missing?  Any help appreciated!
> Brad Stone
> Benchmark Technologies Inc.
>
>
>
> 



~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332857
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-13 Thread Brian Thornton

teah change your evaluator to seconds and do the multiplication.

On Tue, Apr 13, 2010 at 9:09 AM, Raymond Camden  wrote:
>
> Um, aren't those times like 50 seconds or so apart? Isn't 50 seconds <
> 1 minute? Therefore 0 "full" minutes?
>
> On Tue, Apr 13, 2010 at 7:32 AM, Bradley Stone  wrote:
>>
>> All:
>>
>> Feeding DateDiff() dates which are more than 24 hours apart yields minutes:
>>
>> 
>> #DateDiff("n", "2010-04-08 19:41:36.0", "2010-04-12 19:10:34.0")#
>> 
>>
>> Result: 5728
>>
>> However, feeding DateDiff() dates which are LESS than 24 hours apart yields 
>> nothing:
>>
>> 
>> #DateDiff("n", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#
>> 
>>
>> Result: 0
>>
>> What am I missing?  Any help appreciated!
>> Brad Stone
>> Benchmark Technologies Inc.
>>
>>
>>
>>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332853
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff() and Minutes Wierdness

2010-04-13 Thread Raymond Camden

Um, aren't those times like 50 seconds or so apart? Isn't 50 seconds <
1 minute? Therefore 0 "full" minutes?

On Tue, Apr 13, 2010 at 7:32 AM, Bradley Stone  wrote:
>
> All:
>
> Feeding DateDiff() dates which are more than 24 hours apart yields minutes:
>
> 
> #DateDiff("n", "2010-04-08 19:41:36.0", "2010-04-12 19:10:34.0")#
> 
>
> Result: 5728
>
> However, feeding DateDiff() dates which are LESS than 24 hours apart yields 
> nothing:
>
> 
> #DateDiff("n", "2010-04-08 19:34:47.0", "2010-04-08 19:35:35.0")#
> 
>
> Result: 0
>
> What am I missing?  Any help appreciated!
> Brad Stone
> Benchmark Technologies Inc.
>
>
>
> 

~|
Want to reach the ColdFusion community with something they want? Let them know 
on the House of Fusion mailing lists
Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:332851
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm


Re: DateDiff bug, or am I stupid?

2006-12-12 Thread Christopher Jordan
Meh, no worries mate! ;o) I was going to suggest that you write a UDF 
that would handle it the way you expect, but then I thought that's 
probably more trouble than it's worth. :o)

Cheers,
Chris

Jacob Munson wrote:
>> The problem is that you cannot give the CreateDateTime function a '5'
>> and expect it to know if you mean AM or PM. The function works only with
>> a 24 hour clock. pass it a seventeen (which your second case does since
>> hour(now()) equals 17 not 5), and everything works fine.
>> 
>
> I guess I missed the part in the docs that says the 'hour' part of
> CreateDateTime is 24 hour.  :)
>
>
>
>   


~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263876
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: DateDiff bug, or am I stupid?

2006-12-12 Thread Jacob Munson
> The problem is that you cannot give the CreateDateTime function a '5'
> and expect it to know if you mean AM or PM. The function works only with
> a 24 hour clock. pass it a seventeen (which your second case does since
> hour(now()) equals 17 not 5), and everything works fine.

I guess I missed the part in the docs that says the 'hour' part of
CreateDateTime is 24 hour.  :)



-- 
My Sites:
http://www.techfeed.net/blog/
http://www.cfquickdocs.com/
http://cfformprotect.riaforge.org/

~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263874
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: DateDiff bug, or am I stupid?

2006-12-12 Thread Christopher Jordan
The problem is that you cannot give the CreateDateTime function a '5' 
and expect it to know if you mean AM or PM. The function works only with 
a 24 hour clock. pass it a seventeen (which your second case does since 
hour(now()) equals 17 not 5), and everything works fine.

It's not a bug, just some confusion.

Hope this helps! :o)

Cheers,
Chris

Jacob Munson wrote:
> I brought this up in a previous thread:
> http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:49106
>
> If you execute this code, changing the 'currentHour' at the top to the
> current hour in your time zone, tell me if diff1 isn't way off (it
> should be 0):
>
> 
>month(now()),
>   day(now()),
>   currentHour,
>   minute(now()),
>   second(now()))>
> 
> 
>
>month(now()),
>   day(now()),
>   hour(now()),
>   minute(now()),
>   second(now()))>
> 
> 
>
> 
>   date1: #date1#
>   diff1: #diff1#
>   date2: #date2#
>   diff2: #diff2#
> 
>
> The problem I'm seeing is that the hour from date1 is on the 12 hour
> clock, while date2's hour is on the 24 hour clock.  I'd think CF would
> be able to correctly parse that.  Or am I getting something confused?
> I already know how to work around this, I'm just curious about this
> weird behavior.
>
> On a side note, I tried this on both ColdFusion and BlueDragon and get
> the same results, which makes me think I'm not getting something.
>
>   


~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263872
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: DateDiff bug, or am I stupid?

2006-12-12 Thread Doug Brown
Yeah, if I change the DateDiff to "d" it tells me there is a 12 hour
difference. If I do like so, it is right







- Original Message -
From: "Jacob Munson" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Tuesday, December 12, 2006 3:33 PM
Subject: DateDiff bug, or am I stupid?


> I brought this up in a previous thread:
> http://www.houseoffusion.com/groups/CF-Talk/thread.cfm/threadid:49106
>
> If you execute this code, changing the 'currentHour' at the top to the
> current hour in your time zone, tell me if diff1 isn't way off (it
> should be 0):
>
> 
>  month(now()),
> day(now()),
> currentHour,
> minute(now()),
> second(now()))>
> 
> 
>
>  month(now()),
> day(now()),
> hour(now()),
> minute(now()),
> second(now()))>
> 
> 
>
> 
> date1: #date1#
> diff1: #diff1#
> date2: #date2#
> diff2: #diff2#
> 
>
> The problem I'm seeing is that the hour from date1 is on the 12 hour
> clock, while date2's hour is on the 24 hour clock.  I'd think CF would
> be able to correctly parse that.  Or am I getting something confused?
> I already know how to work around this, I'm just curious about this
> weird behavior.
>
> On a side note, I tried this on both ColdFusion and BlueDragon and get
> the same results, which makes me think I'm not getting something.
>
> --
> My Sites:
> http://www.techfeed.net/blog/
> http://www.cfquickdocs.com/
> http://cfformprotect.riaforge.org/
>
> 

~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:263868
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: DateDiff weirdness

2006-11-29 Thread Bobby Hartsfield
Yep. I was going for the difference between two numbers... not seconds
between two actual dates sorry. 

..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 

 


-Original Message-
From: Paul Hastings [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 29, 2006 7:02 PM
To: CF-Talk
Subject: Re: DateDiff weirdness

Bobby Hartsfield wrote:
> 

numeric dates in cf have to be in decimal days since cf's epoch
(dec-31-1899). 
you have to parse that & turn it into a cf datetme object.



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262152
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: DateDiff weirdness

2006-11-29 Thread Paul Hastings
Bobby Hartsfield wrote:
> 

numeric dates in cf have to be in decimal days since cf's epoch (dec-31-1899). 
you have to parse that & turn it into a cf datetme object.

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262147
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: DateDiff weirdness

2006-11-29 Thread Dave Francis
This won't work if difference greater than 59secs, or 2nd seconds less
greater than 1st seconds.


-Original Message-
From: Bobby Hartsfield [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 6:26 PM
To: CF-Talk
Subject: RE: DateDiff weirdness


Try making them BOTH createDateTime() values THEN using datediff() on those
values.

If that doesn’t work, try this...







...:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com





-Original Message-
From: Munson, Jacob [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 29, 2006 6:17 PM
To: CF-Talk
Subject: DateDiff weirdness

I have a date value in this format: mmddhhmmss, for example
20061129041148.  What I need to do is calculate the difference in
seconds between this date and now().  So I figured I'd use
createDateTime() to turn it into a valid date/time object, and then use
dateDiff().  However, doing that I get a huge difference returned, like
43529, when there are truly only 5 seconds between the two date/times.
Any ideas?







--
This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you.


==
"EMF " made the previous annotations.





~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262146
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: DateDiff weirdness

2006-11-29 Thread Munson, Jacob
I found the problem.  My original date was using the 12 hour clock, but
now() was returning a value from the 24 hour clock.  I'm not sure why
that caused dateDiff to return bad results, but it did.




--
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. 

==
"EMF " made the previous annotations.

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262145
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: DateDiff weirdness

2006-11-29 Thread Josh Nathanson
I think you will have to do Ben's parsing as below if you have the dates in 
that format "20061129041148".  Using CreateODBCDateTime or CreateDateTime on 
that string as it stands does not return the desired result.

-- Josh


- Original Message - 
From: "Ben Forta" <[EMAIL PROTECTED]>
To: "CF-Talk" 
Sent: Wednesday, November 29, 2006 3:29 PM
Subject: RE: DateDiff weirdness


> Seems to work, the following returns 9, as it should
>
> 
> 
>
>  Mid(s1, 5, 2),
> Mid(s1, 7, 2),
> Mid(s1, 9, 2),
> Mid(s1, 11, 2),
> Mid(s1, 13, 2))>
>  Mid(s2, 5, 2),
> Mid(s2, 7, 2),
> Mid(s2, 9, 2),
> Mid(s2, 11, 2),
> Mid(s2, 13, 2))>
>
> 
> #DateDiff("s", d1, d2)#
> 
>
> --- Ben
>
>
>
> -Original Message-
> From: Munson, Jacob [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 29, 2006 6:17 PM
> To: CF-Talk
> Subject: DateDiff weirdness
>
> I have a date value in this format: mmddhhmmss, for example
> 20061129041148.  What I need to do is calculate the difference in seconds
> between this date and now().  So I figured I'd use
> createDateTime() to turn it into a valid date/time object, and then use
> dateDiff().  However, doing that I get a huge difference returned, like
> 43529, when there are truly only 5 seconds between the two date/times.
> Any ideas?
>
>
>
>
>
>
> 
> --
> This transmission may contain information that is privileged, confidential
> and/or exempt from disclosure under applicable law. If you are not the
> intended recipient, you are hereby notified that any disclosure, copying,
> distribution, or use of the information contained herein (including any
> reliance thereon) is STRICTLY PROHIBITED. If you received this 
> transmission
> in error, please immediately contact the sender and destroy the material 
> in
> its entirety, whether in electronic or hard copy format. Thank you.
>
> 
> ==
> "EMF " made the previous annotations.
>
>
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262144
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: DateDiff weirdness

2006-11-29 Thread Munson, Jacob
> Try making them BOTH createDateTime() values THEN using 
> datediff() on those
> values.

Both now() and createDateTime return date/time objects, so that
shouldn't matter.
 
> If that doesn't work, try this...
> 
> 
>  'hhmmss') />
> 
> 

At first, I thought that was a good idea, but it wouldn't work if the
two values are different in anything greater than the seconds.




"EMF " made the following annotations.
--
This transmission may contain information that is privileged, confidential 
and/or exempt from disclosure under applicable law. If you are not the intended 
recipient, you are hereby notified that any disclosure, copying, distribution, 
or use of the information contained herein (including any reliance thereon) is 
STRICTLY PROHIBITED. If you received this transmission in error, please 
immediately contact the sender and destroy the material in its entirety, 
whether in electronic or hard copy format. Thank you. 

==


~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262141
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


RE: DateDiff weirdness

2006-11-29 Thread Ben Forta
Seems to work, the following returns 9, as it should








#DateDiff("s", d1, d2)#


--- Ben

 

-Original Message-
From: Munson, Jacob [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 29, 2006 6:17 PM
To: CF-Talk
Subject: DateDiff weirdness

I have a date value in this format: mmddhhmmss, for example
20061129041148.  What I need to do is calculate the difference in seconds
between this date and now().  So I figured I'd use
createDateTime() to turn it into a valid date/time object, and then use
dateDiff().  However, doing that I get a huge difference returned, like
43529, when there are truly only 5 seconds between the two date/times.
Any ideas?
 
 
 
 
 


--
This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you. 


==
"EMF " made the previous annotations.



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262138
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: DateDiff weirdness

2006-11-29 Thread Bobby Hartsfield
Try making them BOTH createDateTime() values THEN using datediff() on those
values.

If that doesn’t work, try this...






 
..:.:.:.:.:.:.:.:.:.:.:.
Bobby Hartsfield
http://acoderslife.com
 

 


-Original Message-
From: Munson, Jacob [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 29, 2006 6:17 PM
To: CF-Talk
Subject: DateDiff weirdness

I have a date value in this format: mmddhhmmss, for example
20061129041148.  What I need to do is calculate the difference in
seconds between this date and now().  So I figured I'd use
createDateTime() to turn it into a valid date/time object, and then use
dateDiff().  However, doing that I get a huge difference returned, like
43529, when there are truly only 5 seconds between the two date/times.
Any ideas?
 
 
 
 
 


--
This transmission may contain information that is privileged, confidential
and/or exempt from disclosure under applicable law. If you are not the
intended recipient, you are hereby notified that any disclosure, copying,
distribution, or use of the information contained herein (including any
reliance thereon) is STRICTLY PROHIBITED. If you received this transmission
in error, please immediately contact the sender and destroy the material in
its entirety, whether in electronic or hard copy format. Thank you. 


==
"EMF " made the previous annotations.



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262135
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: DateDiff weirdness

2006-11-29 Thread Jerry Johnson
Show us the code!

On 11/29/06, Munson, Jacob <[EMAIL PROTECTED]> wrote:
> I have a date value in this format: mmddhhmmss, for example
> 20061129041148.  What I need to do is calculate the difference in
> seconds between this date and now().  So I figured I'd use
> createDateTime() to turn it into a valid date/time object, and then use
> dateDiff().  However, doing that I get a huge difference returned, like
> 43529, when there are truly only 5 seconds between the two date/times.
> Any ideas?

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262134
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: DateDiff Error Rrrrrrr

2006-11-08 Thread Ben Nadel
It looks like LastDownloadDate is just NULL in the database. 


..
Ben Nadel
Certified Advanced ColdFusion MX7 Developer
www.bennadel.com
 
Need ColdFusion Help?
www.bennadel.com/ask-ben/

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Wednesday, November 08, 2006 12:48 PM
To: CF-Talk
Subject: DateDiff Error Rrr

All,

I'm trying to fix someone's code and I'm getting this error within a
datediff.  
When I do a cfdump on the query variable UserCoupon.LastDownloadDate I
get [empty string].  However when I do the query myself I get a single
record returned. Is there something wrong with this syntax.  This code
was originally written against MSAccess, it's been since moved to SQL
Server.

Any help would be much appreciated.

Error starts with ...
Null Pointers are another name for undefined values. 

 
The error occurred in
D:\Inetpub\wwwroot\site\website\coupons\viewcoupons.cfm: line 184

182 :  
183 :   
184 :  
185 : 
186 :  

Here's the actual cf code. (Not my code)
   select *from   Coupons
where  StartDate <= #CreateODBCDateTime(now())# and   EndDate >=
#CreateODBCDateTime(now())#and CompanyID = 1   order by CouponOrder
ASC 



  
 select * 
   from   UserCoupons 
   where  UserID = #cookie.userID# and 
  CouponID = #Coupons.ID#
  

MY TROUBLESHOOTING

LASTD:
  COOKIE.USERID:
  COUPON ID:  
RESULTS:
UserCoupon.LastDownloadDate CFDUMP =  [empty string]
COOKIE.USERID: 24884
COUPON ID: 269

MY TROUBLESHOOTING

  
 
  

ERROR HAPPENS HERE

 

ERROR HAPPENS HERE


 
  
   



~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259674
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: DateDiff Error Rrrrrrr

2006-11-08 Thread coldfusion . developer
Coupons.RefreshDays below is set to 9 as a constant.

D

> All,
> ERROR HAPPENS HERE
> 
 
>  "mm/dd/"))) GTE Coupons.RefreshDays>
> 
> ERROR HAPPENS HERE

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:259672
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4


Re: Datediff help

2006-08-16 Thread Sam Farmer
The problem lies in the order that things are being executed.  The
DateDiff function is being processed by CF before it goes to the
database.  So CF is looking for a variable called MEB.MembShpDate and
ORD.ProcessedDate not the database columns!

You want to use the database function for dateDiff not CF's in this
case.  Not sure what database you are using but I think in SQLServer
the function is called DateDiff.

HTH

Sam

On 8/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
> I have a query where I'm performing an inner join and the cfm page is telling 
> me ...
>
> MembShpDate is an existiing column in the MemberDetails table and it's a valid
> datetime datatype. Any ideas?  Full cfquery is after error message.
>
> The following information is meant for the website developer for debugging 
> purposes.
>
> Error Occurred While Processing Request
> Element MEMBSHPDATE is undefined in MEB.
>
>
> The error occurred in 
> C:\CFusionMX7\wwwroot\PipeLine\Pipe_SchoolCoun\rm\reportMemberReg.cfm: line 31
>
> 29 : 
> 30 :SELECT * FROM Orders ORD INNER JOIN MemberDetails MEB, 
> MEB.MembShpDate, ON ORD.UserID = MEB.MemberAutoID
> 31 :WHERE #DateDiff ('d', MEB.MembShpDate, ORD.ProcessedDate)#" = 0
> 32 :AND ORD.Deleted = 0
> 33 :AND (ORD.PaymentInfo = 'Membership Only' OR ORD.PaymentInfo = 'New 
> Membership and Registration')
>
>
>
>
>
> here is the full query.
> 
>  SELECT * FROM Orders ORD INNER JOIN MemberDetails MEB ON ORD.UserID = 
> MEB.MemberAutoID
>  WHERE #DateDiff ('d', MEB.MembShpDate, ORD.ProcessedDate)#" = 0
>  AND ORD.Deleted = 0
>  AND (ORD.PaymentInfo = 'Membership Only' OR ORD.PaymentInfo = 'New 
> Membership and Registration')
>  ORDER BY MEB.MembShpDate DESC
> 
>
> 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250105
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


RE: Datediff help

2006-08-16 Thread Dawson, Michael
In this context, #DateDiff()# is a ColdFusion function.  If you want the
database's DateDiff() function, remove the #s.

The error occurs because CF thinks it is parsing a CF variable,
MEB.MembShpDate but there is no structure named MEB.

M!ke 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]

Sent: Wednesday, August 16, 2006 8:24 PM
To: CF-Talk
Subject: Datediff help

I have a query where I'm performing an inner join and the cfm page is
telling me ...

MembShpDate is an existiing column in the MemberDetails table and it's a
valid datetime datatype. Any ideas?  Full cfquery is after error
message.

The following information is meant for the website developer for
debugging purposes. 

Error Occurred While Processing Request Element MEMBSHPDATE is undefined
in MEB. 

 
The error occurred in
C:\CFusionMX7\wwwroot\PipeLine\Pipe_SchoolCoun\rm\reportMemberReg.cfm:
line 31

29 : 
30 :SELECT * FROM Orders ORD INNER JOIN MemberDetails MEB,
MEB.MembShpDate, ON ORD.UserID = MEB.MemberAutoID
31 :WHERE #DateDiff ('d', MEB.MembShpDate, ORD.ProcessedDate)#" = 0
32 :AND ORD.Deleted = 0
33 :AND (ORD.PaymentInfo = 'Membership Only' OR ORD.PaymentInfo =
'New Membership and Registration')





here is the full query.
  SELECT *
FROM Orders ORD INNER JOIN MemberDetails MEB ON ORD.UserID =
MEB.MemberAutoID  WHERE #DateDiff ('d', MEB.MembShpDate,
ORD.ProcessedDate)#" = 0  AND ORD.Deleted = 0  AND (ORD.PaymentInfo =
'Membership Only' OR ORD.PaymentInfo = 'New Membership and
Registration')  ORDER BY MEB.MembShpDate DESC 

~|
Introducing the Fusion Authority Quarterly Update. 80 pages of hard-hitting,
up-to-date ColdFusion information by your peers, delivered to your door four 
times a year.
http://www.fusionauthority.com/quarterly

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:250104
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4


Re: DateDiff bug?

2005-08-17 Thread Paul Hastings
Lofback, Chris wrote:
> I've been looking at how the DateDiff calculations work in CFMX 6.1
> and found an odd issue.  It appears that DateDiff "thinks" that 1942
> only has 8759 hours and that 1945 has 8761 hours when both should
> have 8760.  This code shows the discrepancy:

depends on your timezone but that was during world war II & everybody in 
the US was on DST even the bits like indiana which today aren't. it's a 
feature, you're asking for historical timezone data & getting it.

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215520
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: DateDiff bug?

2005-08-17 Thread Claude Schneegans
 >>some adjustment to time during those two years.

I'd really be surprised: the leap year system is so accurate that when 
an adjustment is necessary,
it is only by a second, and after centuries only.

-- 
___
REUSE CODE! Use custom tags;
See http://www.contentbox.com/claude/customtags/tagstore.cfm
(Please send any spam to this address: [EMAIL PROTECTED])
Thanks.


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215470
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: DateDiff bug?

2005-08-17 Thread Lofback, Chris
I tried everything BUT "Leap Hour"--who'd of thunk?  So Java recognizes this, 
but not JS or CF5.  Interesting...

Chris

> -Original Message-
> From: Barney Boisvert
> Sent: Wednesday, August 17, 2005 3:17 PM
> To: CF-Talk
> Subject: Re: DateDiff bug?
> 
> 
> Here's an article I just found.  Googled '1942 "leap hour"' and it was
> the first result:
> 
> http://www.thesunchronicle.com/articles/2005/08/07/opinion/opi
> nion5.txt
> 
> cheers,
> barneyb
> 
> On 8/17/05, Lofback, Chris wrote:
> > I thought it could've been something like that too.  I 
> tried Googling it a few different ways but couldn't find 
> anything about it.  But if that's the reason, why doesn't CF5 
> or JavaScript recognize it?
> > 
> > It's just one of those things where an odd problem might 
> crop up because of the consistency.  Unlikely, I guess, but 
> I'd still rather not have to worry about how dates are being 
> handled...
> > 
> > Chris
> 
> -- 
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/
> 
> Got Gmail? I have 50 invites.
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215468
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: DateDiff bug?

2005-08-17 Thread Barney Boisvert
Here's an article I just found.  Googled '1942 "leap hour"' and it was
the first result:

http://www.thesunchronicle.com/articles/2005/08/07/opinion/opinion5.txt

cheers,
barneyb

On 8/17/05, Lofback, Chris <[EMAIL PROTECTED]> wrote:
> I thought it could've been something like that too.  I tried Googling it a 
> few different ways but couldn't find anything about it.  But if that's the 
> reason, why doesn't CF5 or JavaScript recognize it?
> 
> It's just one of those things where an odd problem might crop up because of 
> the consistency.  Unlikely, I guess, but I'd still rather not have to worry 
> about how dates are being handled...
> 
> Chris

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215466
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: DateDiff bug?

2005-08-17 Thread Lofback, Chris
I thought it could've been something like that too.  I tried Googling it a few 
different ways but couldn't find anything about it.  But if that's the reason, 
why doesn't CF5 or JavaScript recognize it?

It's just one of those things where an odd problem might crop up because of the 
consistency.  Unlikely, I guess, but I'd still rather not have to worry about 
how dates are being handled...

Chris

> -Original Message-
> From: Barney Boisvert
> Sent: Wednesday, August 17, 2005 2:36 PM
> To: CF-Talk
> Subject: Re: DateDiff bug?
> 
> 
> I would imagine that's because the powers that be made some adjustment
> to time during those two years.  Kind of like leap year, but a
> one-time deal.  Since they're paired, it might be a change they made
> in 1942 (like turning on DST in the spring and not turning off in the
> fall), and then in 1945 decided that was silly, so they undid it
> (turned DST back off in the fall).
> 
> That's just a WAG, but I'd imagine it's something along those lines,
> rather than a bug.
> 
> cheers,
> barneyb
> 
> On 8/17/05, Lofback, Chris wrote:
> > I've been looking at how the DateDiff calculations work in 
> CFMX 6.1 and found an odd issue.  It appears that DateDiff 
> "thinks" that 1942 only has 8759 hours and that 1945 has 8761 
> hours when both should have 8760.  This code shows the discrepancy:
> > 
> > 
> > 
> > 
> > 
> > #Year(a)# - #Year(b)# : #d#
> > 
> > 
> > This weird hour counts appear in CFMX 6.1 and BlueDragon 
> 6.2 but not in CF5.  I'm guessing it may be a java issue?  Is 
> this a bug or a feature?  :)
> > 
> > Chris
> > 
> 
> -- 
> Barney Boisvert
> [EMAIL PROTECTED]
> 360.319.6145
> http://www.barneyb.com/
> 
> Got Gmail? I have 50 invites.
> 
> 

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215464
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: DateDiff bug?

2005-08-17 Thread Barney Boisvert
I would imagine that's because the powers that be made some adjustment
to time during those two years.  Kind of like leap year, but a
one-time deal.  Since they're paired, it might be a change they made
in 1942 (like turning on DST in the spring and not turning off in the
fall), and then in 1945 decided that was silly, so they undid it
(turned DST back off in the fall).

That's just a WAG, but I'd imagine it's something along those lines,
rather than a bug.

cheers,
barneyb

On 8/17/05, Lofback, Chris <[EMAIL PROTECTED]> wrote:
> I've been looking at how the DateDiff calculations work in CFMX 6.1 and found 
> an odd issue.  It appears that DateDiff "thinks" that 1942 only has 8759 
> hours and that 1945 has 8761 hours when both should have 8760.  This code 
> shows the discrepancy:
> 
> 
> 
> 
> 
> #Year(a)# - #Year(b)# : #d#
> 
> 
> This weird hour counts appear in CFMX 6.1 and BlueDragon 6.2 but not in CF5.  
> I'm guessing it may be a java issue?  Is this a bug or a feature?  :)
> 
> Chris
> 

-- 
Barney Boisvert
[EMAIL PROTECTED]
360.319.6145
http://www.barneyb.com/

Got Gmail? I have 50 invites.

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:215457
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: DateDiff HUH???

2005-03-11 Thread Tony Weeg
http://dev.navtrak.net/dateDiffBug/anotherdatediffbug.cfm

thats what i came up with just before red sky beta...

tw


On Fri, 11 Mar 2005 11:06:55 -0500, Les Mizzell <[EMAIL PROTECTED]> wrote:
> Ian Skinner wrote:
> > Well, I did some experiments; I guess I am now using a patched version.  So 
> > applying the updater is probably the best idea.
> 
> Shared server - host that SUCKS - client that *likes* the host anyway.
> 
> ACK!!
> 
> Below is very close to what I came up with last night. Both work fine.
> 
> Thanks to all that replied to this one. It was an interesting problem...
> 
> >
> > 
> > 
> > 
> >
> > DateDiff("d",#startDate#,#endDate#)
> > #DateDiff("d",startDate,endDate)#
> > DateDiff("h",#startDate#,#endDate#)
> > #DateDiff("h",startDate,endDate)#
> >
> > 
> > 
> >
> > DateDiff("d",#startDate#,#endDate#)
> > #DateDiff("d",startDate,endDate)#
> > DateDiff("h",#startDate#,#endDate#)
> > #DateDiff("h",startDate,endDate)#
> > 
> > --
> > Ian Skinner
> > Web Programmer
> > BloodSource
> > www.BloodSource.org
> > Sacramento, CA
> >
> > "C code. C code run. Run code run. Please!"
> > - Cynthia Dunning
> >
> > -Original Message-
> > From: Les Mizzell [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, March 10, 2005 4:02 PM
> > To: CF-Talk
> > Subject: Re: DateDiff HUH???
> > 
> > > When using the "d" value of datediff, it is using 24 hours as a day.
> > Since we lose an hour on 4/3/2005, you are one hour short of 9 days, and
> > the extra 23 hours are truncated.
> > 
> > Hmmm - OK, is there a good fix for this? Or does it require a previously
> > mentioned updater?
> > 
> > --
> > ---
> > Les Mizzell
> > 
> > 
> >
> >
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198416
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: DateDiff HUH???

2005-03-11 Thread Les Mizzell
Ian Skinner wrote:
> Well, I did some experiments; I guess I am now using a patched version.  So 
> applying the updater is probably the best idea.

Shared server - host that SUCKS - client that *likes* the host anyway.

ACK!!

Below is very close to what I came up with last night. Both work fine.

Thanks to all that replied to this one. It was an interesting problem...

> 
> 
> 
> 
> 
> DateDiff("d",#startDate#,#endDate#)
> #DateDiff("d",startDate,endDate)#
> DateDiff("h",#startDate#,#endDate#)
> #DateDiff("h",startDate,endDate)#
> 
> 
> 
> 
> DateDiff("d",#startDate#,#endDate#)
> #DateDiff("d",startDate,endDate)#
> DateDiff("h",#startDate#,#endDate#)
> #DateDiff("h",startDate,endDate)#
> 
> --
> Ian Skinner
> Web Programmer
> BloodSource
> www.BloodSource.org
> Sacramento, CA
>  
> "C code. C code run. Run code run. Please!"
> - Cynthia Dunning
> 
> -Original Message-
> From: Les Mizzell [mailto:[EMAIL PROTECTED]
> Sent: Thursday, March 10, 2005 4:02 PM
> To: CF-Talk
> Subject: Re: DateDiff HUH???
> 
> > When using the "d" value of datediff, it is using 24 hours as a day.
> Since we lose an hour on 4/3/2005, you are one hour short of 9 days, and
> the extra 23 hours are truncated.
> 
> Hmmm - OK, is there a good fix for this? Or does it require a previously
> mentioned updater?
> 
> --
> ---
> Les Mizzell
> 
> 
> 
> 

~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198399
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: DateDiff HUH???

2005-03-11 Thread Ian Skinner
Well, I did some experiments; I guess I am now using a patched version.  So 
applying the updater is probably the best idea.





DateDiff("d",#startDate#,#endDate#)
#DateDiff("d",startDate,endDate)#
DateDiff("h",#startDate#,#endDate#)
#DateDiff("h",startDate,endDate)#




DateDiff("d",#startDate#,#endDate#)
#DateDiff("d",startDate,endDate)#
DateDiff("h",#startDate#,#endDate#)
#DateDiff("h",startDate,endDate)#

--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 4:02 PM
To: CF-Talk
Subject: Re: DateDiff HUH???

> When using the "d" value of datediff, it is using 24 hours as a day.
Since we lose an hour on 4/3/2005, you are one hour short of 9 days, and
the extra 23 hours are truncated.

Hmmm - OK, is there a good fix for this? Or does it require a previously
mentioned updater?

--
---
Les Mizzell



~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198394
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: DateDiff HUH???

2005-03-10 Thread Les Mizzell
> When using the "d" value of datediff, it is using 24 hours as a day.  Since 
> we lose an hour on 4/3/2005, you are one hour short of 9 days, and the extra 
> 23 hours are truncated.  

Hmmm - OK, is there a good fix for this? Or does it require a previously 
mentioned updater?

-- 
---
Les Mizzell

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198306
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: DateDiff HUH???

2005-03-10 Thread Dawson, Michael
D'oh!  I meant the 3rd.  You "know" what I meant.  ;^)

M!ke

-Original Message-
From: Ian Skinner [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 4:54 PM
To: CF-Talk
Subject: RE: DateDiff HUH???

Day light savings is April 3rd.  You would get the opposite results in
October with any date range that spans 10/30/2005.

When using the "d" value of datediff, it is using 24 hours as a day.
Since we lose an hour on 4/3/2005, you are one hour short of 9 days, and
the extra 23 hours are truncated.  

It may be hard to believe, but this is desired behavior when doing other
kinds of date diff situations.


~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198297
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: DateDiff HUH???

2005-03-10 Thread Ian Skinner
Day light savings is April 3rd.  You would get the opposite results in October 
with any date range that spans 10/30/2005.

When using the "d" value of datediff, it is using 24 hours as a day.  Since we 
lose an hour on 4/3/2005, you are one hour short of 9 days, and the extra 23 
hours are truncated.  

It may be hard to believe, but this is desired behavior when doing other kinds 
of date diff situations.




--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA
 
"C code. C code run. Run code run. Please!"
- Cynthia Dunning

-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 10, 2005 2:36 PM
To: CF-Talk
Subject: DateDiff HUH???

What the hell?

I've got a form that has select fields for year, month and day for
return and depart trip dates.

For the following:



If the depart date is April 1st (2005,04,01)
And the Return date is April 10th (2005,04,10)

dayAway = 8 days!

This is also true for:
depart (2005,04,02)   return (2005,04,11)
depart (2005,04,03)   return (2005,04,12)


***BUT***

depart (2005,04,04)   return (2005,04,13)
depart (2005,04,05)   return (2005,04,14)
depart (2005,04,06)   return (2005,04,15)
and up:


dayAway = 9 days!

This *ONLY* happens with APRIL as the month.
depart (2005,06,01)   return (2005,06,10) correctly returns the number 9.

WTF??

Ideas? This *is * driving me crazy!!

--
---
Les Mizzell



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198282
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: DateDiff HUH???

2005-03-10 Thread Dawson, Michael
Are you running CFMX 6.x?  This sounds like the daylight saving time bug
that was fixed with an updater.

DST changes at 2:00am on April 2 this year.  Try a test of October when
DST changes again.  It would happen on the last Sunday in October.

If that messes up, make sure you have the latest updaters for CFMX 6.x.

M!ke 

-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 10, 2005 4:36 PM
To: CF-Talk
Subject: DateDiff HUH???

What the hell?

I've got a form that has select fields for year, month and day for
return and depart trip dates.

For the following:



If the depart date is April 1st (2005,04,01) And the Return date is
April 10th (2005,04,10)

dayAway = 8 days!

This is also true for:
depart (2005,04,02)   return (2005,04,11)
depart (2005,04,03)   return (2005,04,12)


***BUT***

depart (2005,04,04)   return (2005,04,13)
depart (2005,04,05)   return (2005,04,14)
depart (2005,04,06)   return (2005,04,15)
.and up:


dayAway = 9 days!

This *ONLY* happens with APRIL as the month.
depart (2005,06,01)   return (2005,06,10) correctly returns the number
9.

WTF??

Ideas? This *is * driving me crazy!!

--
---
Les Mizzell

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:198280
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: datediff gotcha

2005-02-02 Thread Raymond Camden
No idea - but I'm sure it is in the Java docs somewhere


On Wed, 2 Feb 2005 16:04:33 -0500, Michael Dinowitz
<[EMAIL PROTECTED]> wrote:
> Do you have a relative idea what that value is?
> 
> > In the same vein - watch out for datediffs where the value is too big.
> > CF will "roll over" the value if it goes over the maximum size of
> > numbers in CF. This confused the heck out of me when I was building
> > Death Clock (years and years and years ago).
> >
> >
> > On Wed, 2 Feb 2005 15:42:03 -0500, Michael Dinowitz
> > <[EMAIL PROTECTED]> wrote:
> > > Just a small tip. When doing a datediff in CF, make sure both values are
> > > actually dates. I just ran a datediff where the second value (the first
> > > date) came from a DB. The value was actually a blank and CFMX threw a
> > > variable does not exist null error. This was not expected as the
> > variables
> > > all existed and the only difference was that the date value was not a
> > date.
> > >
> > > 
> > >
> > > I solved this by adding a simple test to make sure that the value was a
> > > date:
> > >  > > qLastOrdered.lastdate, now()) LT 180>
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192812
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: datediff gotcha

2005-02-02 Thread Raymond Camden
Yep. Built it using Access for a back end - which was impressive
considerig the traffic it got. I sold it about a year or so ago.


On Wed, 02 Feb 2005 16:01:41 -0500, Ray Champagne <[EMAIL PROTECTED]> wrote:
> Ray, did you build _the_ Death Clock?  The one that was all the rage from
> radio stations to "net geeks" about 7 years ago?  I remember that thing
> 
>

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192811
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: datediff gotcha

2005-02-02 Thread Bryan Stevenson
Yep...that was the JediMaster ;-)

Bryan Stevenson B.Comm.
VP & Director of E-Commerce Development
Electric Edge Systems Group Inc.
phone: 250.480.0642
fax: 250.480.1264
cell: 250.920.8830
e-mail: [EMAIL PROTECTED]
web: www.electricedgesystems.com

~|
Find out how CFTicket can increase your company's customer support 
efficiency by 100%
http://www.houseoffusion.com/banners/view.cfm?bannerid=49

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192810
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


RE: datediff gotcha

2005-02-02 Thread Michael Dinowitz
Do you have a relative idea what that value is?

> In the same vein - watch out for datediffs where the value is too big.
> CF will "roll over" the value if it goes over the maximum size of
> numbers in CF. This confused the heck out of me when I was building
> Death Clock (years and years and years ago).
> 
> 
> On Wed, 2 Feb 2005 15:42:03 -0500, Michael Dinowitz
> <[EMAIL PROTECTED]> wrote:
> > Just a small tip. When doing a datediff in CF, make sure both values are
> > actually dates. I just ran a datediff where the second value (the first
> > date) came from a DB. The value was actually a blank and CFMX threw a
> > variable does not exist null error. This was not expected as the
> variables
> > all existed and the only difference was that the date value was not a
> date.
> >
> > 
> >
> > I solved this by adding a simple test to make sure that the value was a
> > date:
> >  > qLastOrdered.lastdate, now()) LT 180>



~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192809
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: datediff gotcha

2005-02-02 Thread Ray Champagne
Ray, did you build _the_ Death Clock?  The one that was all the rage from 
radio stations to "net geeks" about 7 years ago?  I remember that thing



At 03:54 PM 2/2/2005, you wrote:
>In the same vein - watch out for datediffs where the value is too big.
>CF will "roll over" the value if it goes over the maximum size of
>numbers in CF. This confused the heck out of me when I was building
>Death Clock (years and years and years ago).
>
>
>On Wed, 2 Feb 2005 15:42:03 -0500, Michael Dinowitz
><[EMAIL PROTECTED]> wrote:
> > Just a small tip. When doing a datediff in CF, make sure both values are
> > actually dates. I just ran a datediff where the second value (the first
> > date) came from a DB. The value was actually a blank and CFMX threw a
> > variable does not exist null error. This was not expected as the variables
> > all existed and the only difference was that the date value was not a date.
> >
> > 
> >
> > I solved this by adding a simple test to make sure that the value was a
> > date:
> >  > qLastOrdered.lastdate, now()) LT 180>
> >
> >
>
>

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192808
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: datediff gotcha

2005-02-02 Thread Raymond Camden
In the same vein - watch out for datediffs where the value is too big.
CF will "roll over" the value if it goes over the maximum size of
numbers in CF. This confused the heck out of me when I was building
Death Clock (years and years and years ago).


On Wed, 2 Feb 2005 15:42:03 -0500, Michael Dinowitz
<[EMAIL PROTECTED]> wrote:
> Just a small tip. When doing a datediff in CF, make sure both values are
> actually dates. I just ran a datediff where the second value (the first
> date) came from a DB. The value was actually a blank and CFMX threw a
> variable does not exist null error. This was not expected as the variables
> all existed and the only difference was that the date value was not a date.
> 
> 
> 
> I solved this by adding a simple test to make sure that the value was a
> date:
>  qLastOrdered.lastdate, now()) LT 180>
> 
> 

~|
Logware (www.logware.us): a new and convenient web-based time tracking 
application. Start tracking and documenting hours spent on a project or with a 
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:192805
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54


Re: DateDiff Weirdness

2004-06-22 Thread Matt Woodward
>dateDiff measures the number of whole days different. The date you create
>with createDate() is midnight, which is probably just a few hours away?
>
> 
>
>Try setting today as createDate(year(now()), month(now()), day(now()))

Perfect--exactly what I needed to know!  Thanks!

Matt
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




RE: DateDiff Weirdness

2004-06-22 Thread Matthew Walker
dateDiff measures the number of whole days different. The date you create
with createDate() is midnight, which is probably just a few hours away?

Try setting today as createDate(year(now()), month(now()), day(now()))



  _  

From: Matt Woodward [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, 23 June 2004 1:02 p.m.
To: CF-Talk
Subject: DateDiff Weirdness

I'm seeing some weird behavior with DateDiff that I hope someone can shed
some light on.  I'm sure it's just a misunderstanding on my part but it just
doesn't do what I suspect that it should do.

Today is 6/22/2004, so if you're reading this on a different day, assume
that Now() is 6/22/2004.

Example 1: When I run this example, I would think that it would give me a
value of 1, but diff turns out to be 0.
date1 = CreateDate(2004, 6, 23);
date2 = Now();
diff = DateDiff("D", date2, date1);

Example 2: Given that the above example gives me a value of 0, I decided to
check to see what comparing the current date to itself would give (but again
using CreateDate to create one of the dates).
date1 = CreateDate(2004, 6, 22);
date2 = Now();
diff = DateDiff("D", date2, date1);

Again diff is 0.  I guess this is my confusion--how can comparing the date
to itself AND the date to tomorrow BOTH give me a value of 0?

Example 3: To make sure it wasn't the CreateDate() function that was doing
something weird, I did the following, and it STILL gives me a value of 0:
date3 = DateAdd("D", 1, Now());
date4 = Now();
diff2 = DateDiff("D", date4, date3);

Example 4:  Now for the total weirdness.  When I put a couple of examples
together, one AFFECTS the other.  In the first round, diff = 0 and diff2 =
1:
date1 = CreateDate(2004, 6, 22);
date2 = Now();
diff = DateDiff("D", date2, date1);

WriteOutput("diff = " & diff & "");

date3 = DateAdd("D", 1, Now());
date4 = Now();
diff2 = DateDiff("D", date4, date3);

WriteOutput("diff2 = " & diff2 & "");

But when I chnage it to this:
date1 = CreateDate(2004, 6, 23);
date2 = Now();
diff = DateDiff("D", date2, date1);

WriteOutput("diff = " & diff & "");

date3 = DateAdd("D", 1, Now());
date4 = Now();
diff2 = DateDiff("D", date4, date3);

WriteOutput("diff2 = " & diff2 & "");

BOTH diff and diff2 = 0.  I've tried this on both CFMX 6.1 on Windows 2003
as well as BlueDragon on Mac OS X and I see the same behavior.

Again, I'm sure I'm just having a fundamental misunderstanding of DateDiff
since I've never had to mess with it much, so any enlightment on this will
be greatly appreciated.

Thanks,
Matt

  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]
 [Donations and Support]




Re: DateDiff to determine number of weekdays past?

2004-05-25 Thread Shannon Carr
Your cfscript works great! 

Thanks for your help,
Shannon
  - Original Message - 
  From: Pascal Peters 
  To: CF-Talk 
  Sent: Tuesday, May 25, 2004 3:55 PM
  Subject: RE: DateDiff to determine number of weekdays past?

  
  function WeekdaysBetween(date1,date2){
  var out = 0;
  var tmp = "";
  if(DateCompare(date1,date2) GT 0){
  tmp = date1;
  date1 = date2;
  date2 = tmp;
  }
  if(DayOfWeek(date1) IS 1) date1 = DateAdd("d",-2,date1);
  if(DayOfWeek(date1) IS 7) date1 = DateAdd("d",-1,date1);
  if(DayOfWeek(date2) IS 1) date2 = DateAdd("d",+1,date2);
  if(DayOfWeek(date2) IS 7) date2 = DateAdd("d",+2,date2);
  out = DateDiff("d",date1,date2);
  if(DayOfWeek(date2) LT DayOfWeek(date1)) out = out - 2;
  out = out - (out\7)*2;
  return out;
  }
  d1 = '2004-05-20';
  d2 = '2004-05-25';
  
  #WeekdaysBetween(d1,d2)# 

  > -Original Message-
  > From: Shannon Carr [mailto:[EMAIL PROTECTED] 
  > Sent: dinsdag 25 mei 2004 18:28
  > To: CF-Talk
  > Subject: DateDiff to determine number of weekdays past?
  > 
  > I'm trying to use DateDiff to determine if a call has been 
  > logged by 10:00 am on the third weekday. I can use 'd' to get 
  > the third day but I cannot count Saturday or Sunday.
  > 
  > For instance, if your collection day is Tuesday and your item 
  > was not collected, you must call before 10:00am Friday, 
  > otherwise you have to wait until your next collection day.  
  > This does not include Saturdays or Sundays
  > 
  >   
  >  
  > 
  >   
  >  
  > 
  > 
  > call_logged_date: #call_logged#
  > today: #today#
  > 
  > 
  >  
  > TimeFormat(Now()) lt CreateTime(10,00,00)>  Display record: 
  > it's before 10:00 am on the third weekday.
  > 
  > 
  > 
  > 
  > 
  > 
  > Thanks,
  > Shannon
  > [EMAIL PROTECTED]
  > 
  >
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff to determine number of weekdays past?

2004-05-25 Thread Pascal Peters

function WeekdaysBetween(date1,date2){
	var out = 0;
	var tmp = "";
	if(DateCompare(date1,date2) GT 0){
		tmp = date1;
		date1 = date2;
		date2 = tmp;
	}
	if(DayOfWeek(date1) IS 1) date1 = DateAdd("d",-2,date1);
	if(DayOfWeek(date1) IS 7) date1 = DateAdd("d",-1,date1);
	if(DayOfWeek(date2) IS 1) date2 = DateAdd("d",+1,date2);
	if(DayOfWeek(date2) IS 7) date2 = DateAdd("d",+2,date2);
	out = DateDiff("d",date1,date2);
	if(DayOfWeek(date2) LT DayOfWeek(date1)) out = out - 2;
	out = out - (out\7)*2;
	return out;
}
d1 = '2004-05-20';
d2 = '2004-05-25';

#WeekdaysBetween(d1,d2)# 

> -Original Message-
> From: Shannon Carr [mailto:[EMAIL PROTECTED] 
> Sent: dinsdag 25 mei 2004 18:28
> To: CF-Talk
> Subject: DateDiff to determine number of weekdays past?
> 
> I'm trying to use DateDiff to determine if a call has been 
> logged by 10:00 am on the third weekday. I can use 'd' to get 
> the third day but I cannot count Saturday or Sunday.
> 
> For instance, if your collection day is Tuesday and your item 
> was not collected, you must call before 10:00am Friday, 
> otherwise you have to wait until your next collection day.  
> This does not include Saturdays or Sundays
> 
>   
>  
> 
>   
>  
> 
> 
> call_logged_date: #call_logged#
> today: #today#
> 
> 
>  
> TimeFormat(Now()) lt CreateTime(10,00,00)>  Display record: 
> it's before 10:00 am on the third weekday.
> 
> 
> 
> 
> 
> 
> Thanks,
> Shannon
> [EMAIL PROTECTED]
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff to determine number of weekdays past?

2004-05-25 Thread Ian Skinner
If there is a weekend in the time span, then the dates will be five days apart, so that sounds correct to me?  
Thursday 20th
Friday 21st 1st week day.
Saturday 22nd not counted.
Sunday 23rd not counted.
Monday 24th 2nd week day.
Tuesday 25th 3rd week day.

 
If this is not the correct result, then we need to define the requirement more precisely.

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateDiff to determine number of weekdays past?

2004-05-25 Thread Shannon Carr
The 20th is more than 3 days before the 25th and it's displaying in the if statement.

 
 


call_logged_date: #call_logged#
today: #today#




    Display record: it's before the third weekday.


 

Thanks,
Shannon
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff to determine number of weekdays past?

2004-05-25 Thread Philip Arnold
> From: Shannon Carr
> 
> I tried 'w' but it is returning records more than 3 days old. 

What do you mean by "returning records"?

If you're using it in a Query of Query, then you can use DateDiff, but
if you're using it in a CFQUERY, then you'd be betting checking on the
database specific functionality
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateDiff to determine number of weekdays past?

2004-05-25 Thread Shannon Carr
I tried 'w' but it is returning records more than 3 days old. 

I found the following earlier:

When datepart is Weekday ("w"), DateDiff returns the number of weeks between the two dates. If date1 falls on a Monday, DateDiff counts the number of Mondays until date2. It counts date2 but not date1. 

http://www.houseoffusion.com/lists.cfm/link=m:4:26521:13

Shannon
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff to determine number of weekdays past?

2004-05-25 Thread Ian Skinner
Use "w" as the parameter in you datediff function.  According to the documentation it is for "weekdays" as opposed to all days of "d" and ignores Saturdays and Sundays.

 
--
Ian Skinner
Web Programmer
BloodSource
www.BloodSource.org
Sacramento, CA

"C code. C code run. Run code run. Please!"
 - Cynthia Dunning

Confidentiality Notice:  This message including any
attachments is for the sole use of the intended
recipient(s) and may contain confidential and privileged
information. Any unauthorized review, use, disclosure or
distribution is prohibited. If you are not the
intended recipient, please contact the sender and
delete any copies of this message.
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff to determine number of weekdays past?

2004-05-25 Thread Barney Boisvert
Use 'w' instead, it'll ignore weekend days.

Cheers,
barneyb

> -Original Message-
> From: Shannon Carr [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, May 25, 2004 9:28 AM
> To: CF-Talk
> Subject: DateDiff to determine number of weekdays past?
> 
> I'm trying to use DateDiff to determine if a call has been 
> logged by 10:00
> am on the third weekday. I can use 'd' to get the third day 
> but I cannot
> count Saturday or Sunday.
> 
> For instance, if your collection day is Tuesday and your item was not
> collected, you must call before 10:00am Friday, otherwise you 
> have to wait
> until your next collection day.  This does not include 
> Saturdays or Sundays
> 
>  
>  
> 
>  
>  
> 
> 
> call_logged_date: #call_logged#
> today: #today#
> 
> 
> 
> 
> TimeFormat(Now()) lt
> CreateTime(10,00,00)>
>  Display record: it's before 10:00 am on the third weekday.
> 
> 
> 
> 
> 
> 
> Thanks,
> Shannon
> [EMAIL PROTECTED]
> 
>
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff and MS Access

2004-01-27 Thread Declan Maher
Select * from  TABLE
where  invoice_date BETWEEN  #CreateODBCDate(Now())# and
#Createodbcdate(Dateadd("d",30,DateFormat(now(#

-Original Message-
From: Michael T. Tangorre [mailto:[EMAIL PROTECTED]
Sent: 25 January 2004 16:57
To: CF-Talk
Subject: DateDiff and MS Access

In an access db I have a table with a colum in it called "startDate".
What I
would like to do Is return all the records in the table where the
difference
between the "startDate" and the current date (Date() or now()) is 30
days,
or whatver number of days for that matter What would be the easiest
way
to do this?

Thanks! 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateDiff and MS Access

2004-01-25 Thread Jochem van Dieten
Michael T. Tangorre said:
> In an access db I have a table with a colum in it called
> "startDate". What I would like to do Is return all the records in
> the table where the difference between the "startDate" and the
> current date (Date() or now()) is 30 days, or whatver number of days
> for that matter What would be the easiest way to do this?

SELECT *
FROM   table
WHERE  startDate = 
value="#DateAdd("d",-30,Now())#">

Jochem
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff Fixed!

2004-01-19 Thread JT
the "" around the n worked
  -Original Message-
  From: JT [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 19, 2004 9:04 AM
  To: CF-Talk
  Subject: DateDiff

  why does this not work?

  
  
  #Abs(DateDiff(n, date1, date2))#
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff

2004-01-19 Thread JT
thx mike
JT
  -Original Message-
  From: Mike Townend [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 19, 2004 9:08 AM
  To: CF-Talk
  Subject: RE: DateDiff

  add quotes around the n

  #Abs(DateDiff("n", date1, date2))#

  -Original Message-
  From: JT [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 19, 2004 16:04
  To: CF-Talk
  Subject: DateDiff

  why does this not work?

  
  
  #Abs(DateDiff(n, date1, date2))#
    _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff

2004-01-19 Thread JT
that worked thanks John. I guess the syntax in cf help is wrong
JT
  -Original Message-
  From: John Stanley [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 19, 2004 9:07 AM
  To: CF-Talk
  Subject: RE: DateDiff

  You have to put the n in quotes, othewise it thinks the n is a variable
and
  not an argument.

  -Original Message-
  From: JT [mailto:[EMAIL PROTECTED]
  Sent: Monday, January 19, 2004 11:04 AM
  To: CF-Talk
  Subject: DateDiff

  why does this not work?

  
  
  #Abs(DateDiff(n, date1, date2))#
    _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff

2004-01-19 Thread Mike Townend
add quotes around the n

 
#Abs(DateDiff("n", date1, date2))# 

-Original Message-
From: JT [mailto:[EMAIL PROTECTED] 
Sent: Monday, January 19, 2004 16:04
To: CF-Talk
Subject: DateDiff

why does this not work?



#Abs(DateDiff(n, date1, date2))# 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




RE: DateDiff

2004-01-19 Thread John Stanley
You have to put the n in quotes, othewise it thinks the n is a variable and
not an argument.

-Original Message-
From: JT [mailto:[EMAIL PROTECTED]
Sent: Monday, January 19, 2004 11:04 AM
To: CF-Talk
Subject: DateDiff

why does this not work?



#Abs(DateDiff(n, date1, date2))# 
  _
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateDiff being a bit weird.....

2004-01-15 Thread Jochem van Dieten
A.Little wrote:
> 
> 
> 	
> 	
> 	#i#: #tempdate# to #temp2#: #datediff('d',tempdate,temp2)#
> 
> 
> I get the following output:
> 
> 0: {ts '2004-03-26 00:00:00'} to 31-mar-2004: 4
> 1: {ts '2004-03-27 00:00:00'} to 31-mar-2004: 3
> 2: {ts '2004-03-28 00:00:00'} to 31-mar-2004: 2
> 3: {ts '2004-03-29 00:00:00'} to 31-mar-2004: 2
> 4: {ts '2004-03-30 00:00:00'} to 31-mar-2004: 1
> 5: {ts '2004-03-31 00:00:00'} to 31-mar-2004: 0
> 
> So my question is: why is the difference the same between
> 28-mar-2004/31-mar-2004 as it is for 29-mar-2004/31-mar-2004, ie 2 days?

DST.
http://www.houseoffusion.com/lists.cfm/link=m:4:29301:147058
http://www.macromedia.com/go/wish/

Jochem

-- 
I don't get it
immigrants don't work
and steal our jobs
 - Loesje
 [Todays Threads] 
 [This Message] 
 [Subscription] 
 [Fast Unsubscribe] 
 [User Settings]




Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST

2003-08-22 Thread Johan Steenkamp
Hi Tony

You have to have one date outside DST period and one inside DST period from
what I can see. Certainly if setting my server time to another zone I can
replicate problem.

Have Windows Messenger not AIM

Regards

Johan

- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 3:31 PM
Subject: RE: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST


> do you use aim?
>
> im not sure i see whatcha mean.
>
> if i put a date in there that is in our regular EST
> then i get the right time back
>
> that url explains it and shows that its fixedat least i thought.
>
> let me check again...
> tw
>
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 10:51 PM
> To: CF-Talk
> Subject: Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST
>
>
> Thanks Tony
>
> Well the bug is still there for all of us as far as I can tell.
>
> I get incorrect datediff() on my system even when setting it to US time
> zone
> and then using one date outside appropriate US region DST period and
> other
> date inside DST period.
>
> If the dates are both outside or inside the DST period then no problem
> no
> matter what machine time zone is.
>
> Regards
>
> Johan
>
>
> - Original Message - 
> From: "Tony Weeg" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, August 22, 2003 2:07 PM
> Subject: RE: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST
>
>
> > actually...
> >
> > it was a bug that was fixed, fixed to help with dst in the states, so
> it
> > works
> > perfectly up here, however i would imagine adverse affects for
> you...not
> > good
> > since it doesnt accomodate both places...i had submitted a bug to mm
> > during
> > the redsky beta, and they validated it...
> >
> > http://www.navtrak.net/cfmxBug.cfm
> >
> > has some code, and the explanation of what i found, you will see
> > it...and
> > that is on a 6.1 server.
> >
> > try that code on your machine, and see what happens.
> >
> > tony
> >
> > -Original Message-
> > From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 21, 2003 7:01 PM
> > To: CF-Talk
> > Subject: Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span
> DST
> >
> >
> > Hi Tony
> >
> > I have tracked it down - is a bug in 6.1 in my opinion.
> >
> > You did not see error as the problem occurs when one of the dates is
> in
> > DST
> > and the other is not in DST. The date range I gave has this situation
> > for NZ
> > time.
> >
> > For example if you system is set to say US Eastern time try 1 Jan 2003
> > to
> > end April 2003 which has one date in daylight having and one not, and
> > you
> > should see the problem.
> >
> > Otherwise choose two dates that span your regional DST dates.
> >
> > Testing same on 6.0 = no problem so bug introduced in 6.1
> >
> > Regards
> >
> > Johan
> >
> >
> > - Original Message - 
> > From: "Tony Weeg" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Friday, August 22, 2003 10:25 AM
> > Subject: RE: DateDiff() broken in 6.1 (Bug?)
> >
> >
> > > johann
> > >
> > > 6.1 ent
> > >
> > > tony weeg
> > > uncertified advanced cold fusion developer
> > > tony at navtrak dot net
> > > www.navtrak.net
> > > office 410.548.2337
> > > fax 410.860.2337
> > >
> > >
> > > -Original Message-
> > > From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> > > Sent: Thursday, August 21, 2003 4:38 PM
> > > To: CF-Talk
> > > Subject: Re: DateDiff() broken in 6.1 (Bug?)
> > >
> > >
> > > Hi Tony
> > >
> > > Thanks for testing - can you confirm your test was on CF 6.1? If so
> > was
> > > it Standard or Enterprise version? My testing is on Standard.
> > >
> > > It works on 6.0 for me but not 6.1
> > >
> > > Noted I can get the correct result by adding 1 hour to the second
> > date.
> > >
> > > Displaying system getTimeZoneInfo() shows not difference between 6.0
> > or
> > > 6.1 systems so does not look like anything with localization/time.
> > >
>

RE: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST

2003-08-22 Thread Tony Weeg
do you use aim?

im not sure i see whatcha mean.

if i put a date in there that is in our regular EST
then i get the right time back

that url explains it and shows that its fixedat least i thought.

let me check again...
tw


-Original Message-
From: Johan Steenkamp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 10:51 PM
To: CF-Talk
Subject: Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST


Thanks Tony

Well the bug is still there for all of us as far as I can tell.

I get incorrect datediff() on my system even when setting it to US time
zone
and then using one date outside appropriate US region DST period and
other
date inside DST period.

If the dates are both outside or inside the DST period then no problem
no
matter what machine time zone is.

Regards

Johan


- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 2:07 PM
Subject: RE: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST


> actually...
>
> it was a bug that was fixed, fixed to help with dst in the states, so
it
> works
> perfectly up here, however i would imagine adverse affects for
you...not
> good
> since it doesnt accomodate both places...i had submitted a bug to mm
> during
> the redsky beta, and they validated it...
>
> http://www.navtrak.net/cfmxBug.cfm
>
> has some code, and the explanation of what i found, you will see
> it...and
> that is on a 6.1 server.
>
> try that code on your machine, and see what happens.
>
> tony
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 7:01 PM
> To: CF-Talk
> Subject: Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span
DST
>
>
> Hi Tony
>
> I have tracked it down - is a bug in 6.1 in my opinion.
>
> You did not see error as the problem occurs when one of the dates is
in
> DST
> and the other is not in DST. The date range I gave has this situation
> for NZ
> time.
>
> For example if you system is set to say US Eastern time try 1 Jan 2003
> to
> end April 2003 which has one date in daylight having and one not, and
> you
> should see the problem.
>
> Otherwise choose two dates that span your regional DST dates.
>
> Testing same on 6.0 = no problem so bug introduced in 6.1
>
> Regards
>
> Johan
>
>
> - Original Message - 
> From: "Tony Weeg" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, August 22, 2003 10:25 AM
> Subject: RE: DateDiff() broken in 6.1 (Bug?)
>
>
> > johann
> >
> > 6.1 ent
> >
> > tony weeg
> > uncertified advanced cold fusion developer
> > tony at navtrak dot net
> > www.navtrak.net
> > office 410.548.2337
> > fax 410.860.2337
> >
> >
> > -Original Message-
> > From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 21, 2003 4:38 PM
> > To: CF-Talk
> > Subject: Re: DateDiff() broken in 6.1 (Bug?)
> >
> >
> > Hi Tony
> >
> > Thanks for testing - can you confirm your test was on CF 6.1? If so
> was
> > it Standard or Enterprise version? My testing is on Standard.
> >
> > It works on 6.0 for me but not 6.1
> >
> > Noted I can get the correct result by adding 1 hour to the second
> date.
> >
> > Displaying system getTimeZoneInfo() shows not difference between 6.0
> or
> > 6.1 systems so does not look like anything with localization/time.
> >
> > regards
> >
> > Johan
> >
> >
> > - Original Message - 
> > From: "Tony Weeg" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Thursday, August 21, 2003 3:36 PM
> > Subject: RE: DateDiff() broken in 6.1 (Bug?)
> >
> >
> > > here is what i get...
> > >
> > > 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153
2.
> > > {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154 3.
{ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155 4. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156 5. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157 6. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158 7. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159 8. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003

Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST

2003-08-21 Thread Johan Steenkamp
Thanks Tony

Well the bug is still there for all of us as far as I can tell.

I get incorrect datediff() on my system even when setting it to US time zone
and then using one date outside appropriate US region DST period and other
date inside DST period.

If the dates are both outside or inside the DST period then no problem no
matter what machine time zone is.

Regards

Johan


- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 2:07 PM
Subject: RE: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST


> actually...
>
> it was a bug that was fixed, fixed to help with dst in the states, so it
> works
> perfectly up here, however i would imagine adverse affects for you...not
> good
> since it doesnt accomodate both places...i had submitted a bug to mm
> during
> the redsky beta, and they validated it...
>
> http://www.navtrak.net/cfmxBug.cfm
>
> has some code, and the explanation of what i found, you will see
> it...and
> that is on a 6.1 server.
>
> try that code on your machine, and see what happens.
>
> tony
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 7:01 PM
> To: CF-Talk
> Subject: Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST
>
>
> Hi Tony
>
> I have tracked it down - is a bug in 6.1 in my opinion.
>
> You did not see error as the problem occurs when one of the dates is in
> DST
> and the other is not in DST. The date range I gave has this situation
> for NZ
> time.
>
> For example if you system is set to say US Eastern time try 1 Jan 2003
> to
> end April 2003 which has one date in daylight having and one not, and
> you
> should see the problem.
>
> Otherwise choose two dates that span your regional DST dates.
>
> Testing same on 6.0 = no problem so bug introduced in 6.1
>
> Regards
>
> Johan
>
>
> - Original Message - 
> From: "Tony Weeg" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Friday, August 22, 2003 10:25 AM
> Subject: RE: DateDiff() broken in 6.1 (Bug?)
>
>
> > johann
> >
> > 6.1 ent
> >
> > tony weeg
> > uncertified advanced cold fusion developer
> > tony at navtrak dot net
> > www.navtrak.net
> > office 410.548.2337
> > fax 410.860.2337
> >
> >
> > -Original Message-
> > From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, August 21, 2003 4:38 PM
> > To: CF-Talk
> > Subject: Re: DateDiff() broken in 6.1 (Bug?)
> >
> >
> > Hi Tony
> >
> > Thanks for testing - can you confirm your test was on CF 6.1? If so
> was
> > it Standard or Enterprise version? My testing is on Standard.
> >
> > It works on 6.0 for me but not 6.1
> >
> > Noted I can get the correct result by adding 1 hour to the second
> date.
> >
> > Displaying system getTimeZoneInfo() shows not difference between 6.0
> or
> > 6.1 systems so does not look like anything with localization/time.
> >
> > regards
> >
> > Johan
> >
> >
> > - Original Message - 
> > From: "Tony Weeg" <[EMAIL PROTECTED]>
> > To: "CF-Talk" <[EMAIL PROTECTED]>
> > Sent: Thursday, August 21, 2003 3:36 PM
> > Subject: RE: DateDiff() broken in 6.1 (Bug?)
> >
> >
> > > here is what i get...
> > >
> > > 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153 2.
> > > {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154 3. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155 4. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156 5. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157 6. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158 7. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159 8. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160 9. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161 10. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162 11. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163 12. {ts
> > > '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164 13. {t

RE: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST

2003-08-21 Thread Tony Weeg
actually...

it was a bug that was fixed, fixed to help with dst in the states, so it
works
perfectly up here, however i would imagine adverse affects for you...not
good
since it doesnt accomodate both places...i had submitted a bug to mm
during
the redsky beta, and they validated it...

http://www.navtrak.net/cfmxBug.cfm

has some code, and the explanation of what i found, you will see
it...and
that is on a 6.1 server.

try that code on your machine, and see what happens.

tony

-Original Message-
From: Johan Steenkamp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 7:01 PM
To: CF-Talk
Subject: Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST


Hi Tony

I have tracked it down - is a bug in 6.1 in my opinion.

You did not see error as the problem occurs when one of the dates is in
DST
and the other is not in DST. The date range I gave has this situation
for NZ
time.

For example if you system is set to say US Eastern time try 1 Jan 2003
to
end April 2003 which has one date in daylight having and one not, and
you
should see the problem.

Otherwise choose two dates that span your regional DST dates.

Testing same on 6.0 = no problem so bug introduced in 6.1

Regards

Johan


- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 10:25 AM
Subject: RE: DateDiff() broken in 6.1 (Bug?)


> johann
>
> 6.1 ent
>
> tony weeg
> uncertified advanced cold fusion developer
> tony at navtrak dot net
> www.navtrak.net
> office 410.548.2337
> fax 410.860.2337
>
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 4:38 PM
> To: CF-Talk
> Subject: Re: DateDiff() broken in 6.1 (Bug?)
>
>
> Hi Tony
>
> Thanks for testing - can you confirm your test was on CF 6.1? If so
was
> it Standard or Enterprise version? My testing is on Standard.
>
> It works on 6.0 for me but not 6.1
>
> Noted I can get the correct result by adding 1 hour to the second
date.
>
> Displaying system getTimeZoneInfo() shows not difference between 6.0
or
> 6.1 systems so does not look like anything with localization/time.
>
> regards
>
> Johan
>
>
> - Original Message - 
> From: "Tony Weeg" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, August 21, 2003 3:36 PM
> Subject: RE: DateDiff() broken in 6.1 (Bug?)
>
>
> > here is what i get...
> >
> > 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153 2.
> > {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154 3. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155 4. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156 5. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157 6. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158 7. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159 8. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160 9. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161 10. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162 11. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163 12. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164 13. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-13 00:00:00'} = 165 14. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-14 00:00:00'} = 166 15. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-15 00:00:00'} = 167 16. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-16 00:00:00'} = 168 17. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-17 00:00:00'} = 169 18. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-18 00:00:00'} = 170 19. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-19 00:00:00'} = 171 20. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-20 00:00:00'} = 172 21. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-21 00:00:00'} = 173 22. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-22 00:00:00'} = 174 23. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-23 00:00:00'} = 175 24. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-24 00:00:00'} = 176 25. {ts
> > '2003-05-01 00:00:00'} - {ts

Re: DateDiff() broken in 6.1 (Bug?) - happens if dates span DST

2003-08-21 Thread Johan Steenkamp
Hi Tony

I have tracked it down - is a bug in 6.1 in my opinion.

You did not see error as the problem occurs when one of the dates is in DST
and the other is not in DST. The date range I gave has this situation for NZ
time.

For example if you system is set to say US Eastern time try 1 Jan 2003 to
end April 2003 which has one date in daylight having and one not, and you
should see the problem.

Otherwise choose two dates that span your regional DST dates.

Testing same on 6.0 = no problem so bug introduced in 6.1

Regards

Johan


- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, August 22, 2003 10:25 AM
Subject: RE: DateDiff() broken in 6.1 (Bug?)


> johann
>
> 6.1 ent
>
> tony weeg
> uncertified advanced cold fusion developer
> tony at navtrak dot net
> www.navtrak.net
> office 410.548.2337
> fax 410.860.2337
>
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Thursday, August 21, 2003 4:38 PM
> To: CF-Talk
> Subject: Re: DateDiff() broken in 6.1 (Bug?)
>
>
> Hi Tony
>
> Thanks for testing - can you confirm your test was on CF 6.1? If so was
> it Standard or Enterprise version? My testing is on Standard.
>
> It works on 6.0 for me but not 6.1
>
> Noted I can get the correct result by adding 1 hour to the second date.
>
> Displaying system getTimeZoneInfo() shows not difference between 6.0 or
> 6.1 systems so does not look like anything with localization/time.
>
> regards
>
> Johan
>
>
> - Original Message - 
> From: "Tony Weeg" <[EMAIL PROTECTED]>
> To: "CF-Talk" <[EMAIL PROTECTED]>
> Sent: Thursday, August 21, 2003 3:36 PM
> Subject: RE: DateDiff() broken in 6.1 (Bug?)
>
>
> > here is what i get...
> >
> > 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153 2.
> > {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154 3. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155 4. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156 5. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157 6. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158 7. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159 8. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160 9. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161 10. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162 11. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163 12. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164 13. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-13 00:00:00'} = 165 14. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-14 00:00:00'} = 166 15. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-15 00:00:00'} = 167 16. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-16 00:00:00'} = 168 17. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-17 00:00:00'} = 169 18. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-18 00:00:00'} = 170 19. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-19 00:00:00'} = 171 20. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-20 00:00:00'} = 172 21. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-21 00:00:00'} = 173 22. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-22 00:00:00'} = 174 23. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-23 00:00:00'} = 175 24. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-24 00:00:00'} = 176 25. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-25 00:00:00'} = 177 26. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-26 00:00:00'} = 178 27. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-27 00:00:00'} = 179 28. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-28 00:00:00'} = 180 29. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-29 00:00:00'} = 181 30. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-30 00:00:00'} = 182 31. {ts
> > '2003-05-01 00:00:00'} - {ts '2003-10-31 00:00:00'} = 183
> >
> > hth ... tony
> >
> > -Origin

RE: DateDiff() broken in 6.1 (Bug?)

2003-08-21 Thread Tony Weeg
johann

6.1 ent

tony weeg
uncertified advanced cold fusion developer
tony at navtrak dot net
www.navtrak.net
office 410.548.2337
fax 410.860.2337


-Original Message-
From: Johan Steenkamp [mailto:[EMAIL PROTECTED] 
Sent: Thursday, August 21, 2003 4:38 PM
To: CF-Talk
Subject: Re: DateDiff() broken in 6.1 (Bug?)


Hi Tony

Thanks for testing - can you confirm your test was on CF 6.1? If so was
it Standard or Enterprise version? My testing is on Standard.

It works on 6.0 for me but not 6.1

Noted I can get the correct result by adding 1 hour to the second date.

Displaying system getTimeZoneInfo() shows not difference between 6.0 or
6.1 systems so does not look like anything with localization/time.

regards

Johan


- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 3:36 PM
Subject: RE: DateDiff() broken in 6.1 (Bug?)


> here is what i get...
>
> 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153 2. 
> {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154 3. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155 4. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156 5. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157 6. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158 7. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159 8. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160 9. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161 10. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162 11. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163 12. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164 13. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-13 00:00:00'} = 165 14. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-14 00:00:00'} = 166 15. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-15 00:00:00'} = 167 16. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-16 00:00:00'} = 168 17. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-17 00:00:00'} = 169 18. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-18 00:00:00'} = 170 19. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-19 00:00:00'} = 171 20. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-20 00:00:00'} = 172 21. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-21 00:00:00'} = 173 22. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-22 00:00:00'} = 174 23. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-23 00:00:00'} = 175 24. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-24 00:00:00'} = 176 25. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-25 00:00:00'} = 177 26. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-26 00:00:00'} = 178 27. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-27 00:00:00'} = 179 28. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-28 00:00:00'} = 180 29. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-29 00:00:00'} = 181 30. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-30 00:00:00'} = 182 31. {ts 
> '2003-05-01 00:00:00'} - {ts '2003-10-31 00:00:00'} = 183
>
> hth ... tony
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 8:50 PM
> To: CF-Talk
> Subject: DateDiff() broken in 6.1 (Bug?)
>
>
> Can anyone else confirm that the datediff() function is broken in MX 
> 6.1 compared with 6.0?
>
> Simple test (code below) - output will show two consecutive dates with

> a difference of  157 days i.e: ...
> 156
> 157
> 157
> 158
> ...
>
> where it should be
> ...
> 156
> 157
> 158
> 159
> ...
>
> Problem not evident on 6.0 (Windows or Linux).
>
>
> 
> 
>
> 
>
> 
>#i#. 
> #date1# - #date2# = #datediff("d",date1,date2)#
> 
>
>
> 
> Johan Steenkamp
> www.assetnow.com
> 
>
>
>
> 

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re: DateDiff() broken in 6.1 (Bug?)

2003-08-21 Thread Johan Steenkamp
Tony

Setting my system time to a US time zone then datediff works correctly.

Change it to NZ time (which is -12 hours UTC) and problem is there.

Adding UTC offset to second date works consistently but is a hassle -
especially given it worked fine in 6.0

Johan


- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 3:36 PM
Subject: RE: DateDiff() broken in 6.1 (Bug?)


> here is what i get...
>
> 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153
> 2. {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154
> 3. {ts '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155
> 4. {ts '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156
> 5. {ts '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157
> 6. {ts '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158
> 7. {ts '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159
> 8. {ts '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160
> 9. {ts '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161
> 10. {ts '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162
> 11. {ts '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163
> 12. {ts '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164
> 13. {ts '2003-05-01 00:00:00'} - {ts '2003-10-13 00:00:00'} = 165
> 14. {ts '2003-05-01 00:00:00'} - {ts '2003-10-14 00:00:00'} = 166
> 15. {ts '2003-05-01 00:00:00'} - {ts '2003-10-15 00:00:00'} = 167
> 16. {ts '2003-05-01 00:00:00'} - {ts '2003-10-16 00:00:00'} = 168
> 17. {ts '2003-05-01 00:00:00'} - {ts '2003-10-17 00:00:00'} = 169
> 18. {ts '2003-05-01 00:00:00'} - {ts '2003-10-18 00:00:00'} = 170
> 19. {ts '2003-05-01 00:00:00'} - {ts '2003-10-19 00:00:00'} = 171
> 20. {ts '2003-05-01 00:00:00'} - {ts '2003-10-20 00:00:00'} = 172
> 21. {ts '2003-05-01 00:00:00'} - {ts '2003-10-21 00:00:00'} = 173
> 22. {ts '2003-05-01 00:00:00'} - {ts '2003-10-22 00:00:00'} = 174
> 23. {ts '2003-05-01 00:00:00'} - {ts '2003-10-23 00:00:00'} = 175
> 24. {ts '2003-05-01 00:00:00'} - {ts '2003-10-24 00:00:00'} = 176
> 25. {ts '2003-05-01 00:00:00'} - {ts '2003-10-25 00:00:00'} = 177
> 26. {ts '2003-05-01 00:00:00'} - {ts '2003-10-26 00:00:00'} = 178
> 27. {ts '2003-05-01 00:00:00'} - {ts '2003-10-27 00:00:00'} = 179
> 28. {ts '2003-05-01 00:00:00'} - {ts '2003-10-28 00:00:00'} = 180
> 29. {ts '2003-05-01 00:00:00'} - {ts '2003-10-29 00:00:00'} = 181
> 30. {ts '2003-05-01 00:00:00'} - {ts '2003-10-30 00:00:00'} = 182
> 31. {ts '2003-05-01 00:00:00'} - {ts '2003-10-31 00:00:00'} = 183
>
> hth ... tony
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 8:50 PM
> To: CF-Talk
> Subject: DateDiff() broken in 6.1 (Bug?)
>
>
> Can anyone else confirm that the datediff() function is broken in MX 6.1
> compared with 6.0?
>
> Simple test (code below) - output will show two consecutive dates with a
> difference of  157 days i.e:
> ...
> 156
> 157
> 157
> 158
> ...
>
> where it should be
> ...
> 156
> 157
> 158
> 159
> ...
>
> Problem not evident on 6.0 (Windows or Linux).
>
>
> 
> 
>
> 
>
> 
>  
>  #i#. #date1# - #date2# =
> #datediff("d",date1,date2)#
> 
>
>
> 
> Johan Steenkamp
> www.assetnow.com
> 
>
>
>
> 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm


Re: DateDiff() broken in 6.1 (Bug?)

2003-08-21 Thread Johan Steenkamp
Hi Tony

Thanks for testing - can you confirm your test was on CF 6.1? If so was it
Standard or Enterprise version? My testing is on Standard.

It works on 6.0 for me but not 6.1

Noted I can get the correct result by adding 1 hour to the second date.

Displaying system getTimeZoneInfo() shows not difference between 6.0 or 6.1
systems so does not look like anything with localization/time.

regards

Johan


- Original Message - 
From: "Tony Weeg" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Thursday, August 21, 2003 3:36 PM
Subject: RE: DateDiff() broken in 6.1 (Bug?)


> here is what i get...
>
> 1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153
> 2. {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154
> 3. {ts '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155
> 4. {ts '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156
> 5. {ts '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157
> 6. {ts '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158
> 7. {ts '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159
> 8. {ts '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160
> 9. {ts '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161
> 10. {ts '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162
> 11. {ts '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163
> 12. {ts '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164
> 13. {ts '2003-05-01 00:00:00'} - {ts '2003-10-13 00:00:00'} = 165
> 14. {ts '2003-05-01 00:00:00'} - {ts '2003-10-14 00:00:00'} = 166
> 15. {ts '2003-05-01 00:00:00'} - {ts '2003-10-15 00:00:00'} = 167
> 16. {ts '2003-05-01 00:00:00'} - {ts '2003-10-16 00:00:00'} = 168
> 17. {ts '2003-05-01 00:00:00'} - {ts '2003-10-17 00:00:00'} = 169
> 18. {ts '2003-05-01 00:00:00'} - {ts '2003-10-18 00:00:00'} = 170
> 19. {ts '2003-05-01 00:00:00'} - {ts '2003-10-19 00:00:00'} = 171
> 20. {ts '2003-05-01 00:00:00'} - {ts '2003-10-20 00:00:00'} = 172
> 21. {ts '2003-05-01 00:00:00'} - {ts '2003-10-21 00:00:00'} = 173
> 22. {ts '2003-05-01 00:00:00'} - {ts '2003-10-22 00:00:00'} = 174
> 23. {ts '2003-05-01 00:00:00'} - {ts '2003-10-23 00:00:00'} = 175
> 24. {ts '2003-05-01 00:00:00'} - {ts '2003-10-24 00:00:00'} = 176
> 25. {ts '2003-05-01 00:00:00'} - {ts '2003-10-25 00:00:00'} = 177
> 26. {ts '2003-05-01 00:00:00'} - {ts '2003-10-26 00:00:00'} = 178
> 27. {ts '2003-05-01 00:00:00'} - {ts '2003-10-27 00:00:00'} = 179
> 28. {ts '2003-05-01 00:00:00'} - {ts '2003-10-28 00:00:00'} = 180
> 29. {ts '2003-05-01 00:00:00'} - {ts '2003-10-29 00:00:00'} = 181
> 30. {ts '2003-05-01 00:00:00'} - {ts '2003-10-30 00:00:00'} = 182
> 31. {ts '2003-05-01 00:00:00'} - {ts '2003-10-31 00:00:00'} = 183
>
> hth ... tony
>
> -Original Message-
> From: Johan Steenkamp [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, August 20, 2003 8:50 PM
> To: CF-Talk
> Subject: DateDiff() broken in 6.1 (Bug?)
>
>
> Can anyone else confirm that the datediff() function is broken in MX 6.1
> compared with 6.0?
>
> Simple test (code below) - output will show two consecutive dates with a
> difference of  157 days i.e:
> ...
> 156
> 157
> 157
> 158
> ...
>
> where it should be
> ...
> 156
> 157
> 158
> 159
> ...
>
> Problem not evident on 6.0 (Windows or Linux).
>
>
> 
> 
>
> 
>
> 
>  
>  #i#. #date1# - #date2# =
> #datediff("d",date1,date2)#
> 
>
>
> 
> Johan Steenkamp
> www.assetnow.com
> 
>
>
>
> 
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: DateDiff() broken in 6.1 (Bug?)

2003-08-21 Thread Tony Weeg
here is what i get...

1. {ts '2003-05-01 00:00:00'} - {ts '2003-10-01 00:00:00'} = 153
2. {ts '2003-05-01 00:00:00'} - {ts '2003-10-02 00:00:00'} = 154
3. {ts '2003-05-01 00:00:00'} - {ts '2003-10-03 00:00:00'} = 155
4. {ts '2003-05-01 00:00:00'} - {ts '2003-10-04 00:00:00'} = 156
5. {ts '2003-05-01 00:00:00'} - {ts '2003-10-05 00:00:00'} = 157
6. {ts '2003-05-01 00:00:00'} - {ts '2003-10-06 00:00:00'} = 158
7. {ts '2003-05-01 00:00:00'} - {ts '2003-10-07 00:00:00'} = 159
8. {ts '2003-05-01 00:00:00'} - {ts '2003-10-08 00:00:00'} = 160
9. {ts '2003-05-01 00:00:00'} - {ts '2003-10-09 00:00:00'} = 161
10. {ts '2003-05-01 00:00:00'} - {ts '2003-10-10 00:00:00'} = 162
11. {ts '2003-05-01 00:00:00'} - {ts '2003-10-11 00:00:00'} = 163
12. {ts '2003-05-01 00:00:00'} - {ts '2003-10-12 00:00:00'} = 164
13. {ts '2003-05-01 00:00:00'} - {ts '2003-10-13 00:00:00'} = 165
14. {ts '2003-05-01 00:00:00'} - {ts '2003-10-14 00:00:00'} = 166
15. {ts '2003-05-01 00:00:00'} - {ts '2003-10-15 00:00:00'} = 167
16. {ts '2003-05-01 00:00:00'} - {ts '2003-10-16 00:00:00'} = 168
17. {ts '2003-05-01 00:00:00'} - {ts '2003-10-17 00:00:00'} = 169
18. {ts '2003-05-01 00:00:00'} - {ts '2003-10-18 00:00:00'} = 170
19. {ts '2003-05-01 00:00:00'} - {ts '2003-10-19 00:00:00'} = 171
20. {ts '2003-05-01 00:00:00'} - {ts '2003-10-20 00:00:00'} = 172
21. {ts '2003-05-01 00:00:00'} - {ts '2003-10-21 00:00:00'} = 173
22. {ts '2003-05-01 00:00:00'} - {ts '2003-10-22 00:00:00'} = 174
23. {ts '2003-05-01 00:00:00'} - {ts '2003-10-23 00:00:00'} = 175
24. {ts '2003-05-01 00:00:00'} - {ts '2003-10-24 00:00:00'} = 176
25. {ts '2003-05-01 00:00:00'} - {ts '2003-10-25 00:00:00'} = 177
26. {ts '2003-05-01 00:00:00'} - {ts '2003-10-26 00:00:00'} = 178
27. {ts '2003-05-01 00:00:00'} - {ts '2003-10-27 00:00:00'} = 179
28. {ts '2003-05-01 00:00:00'} - {ts '2003-10-28 00:00:00'} = 180
29. {ts '2003-05-01 00:00:00'} - {ts '2003-10-29 00:00:00'} = 181
30. {ts '2003-05-01 00:00:00'} - {ts '2003-10-30 00:00:00'} = 182
31. {ts '2003-05-01 00:00:00'} - {ts '2003-10-31 00:00:00'} = 183

hth ... tony

-Original Message-
From: Johan Steenkamp [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, August 20, 2003 8:50 PM
To: CF-Talk
Subject: DateDiff() broken in 6.1 (Bug?)


Can anyone else confirm that the datediff() function is broken in MX 6.1
compared with 6.0?

Simple test (code below) - output will show two consecutive dates with a
difference of  157 days i.e:
...
156
157
157
158
...

where it should be
...
156
157
158
159
...

Problem not evident on 6.0 (Windows or Linux).








 
 #i#. #date1# - #date2# =
#datediff("d",date1,date2)#




Johan Steenkamp
www.assetnow.com




~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com


RE: DateDiff question

2003-08-20 Thread Lofback, Chris
> Here's an excerpt direct from ColdFusion Studio's help pages ;)

Thanks.  Well, that's what I get for relying on the popup help and the O'Reilly 
function reference...

> When datepart is Weekday ("w"), DateDiff returns the number 
> of weeks between
> the two dates. If date1 falls on a Monday, DateDiff counts 
> the number of
> Mondays until date2. It counts date2 but not date1. If 
> interval is Week
> ("ww"), however, the DateDiff function returns the number of 
> calendar weeks
> between the two dates. It counts the number of Sundays 
> between date1 and
> date2. DateDiff counts date2 if it falls on a Sunday; but it 
> doesn't count
> date1, even if it does fall on a Sunday.

This seems counterintuitive, doesn't it?  One would assume weeks between dates would 
be 7-day units, just like months between dates is handled.

Also, another poster says that CFMX has changed the DateDiff calc for 'ww'...

Chris
~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: DateDiff question

2003-08-19 Thread Bryan Love
Here's an excerpt direct from ColdFusion Studio's help pages ;)

When datepart is Weekday ("w"), DateDiff returns the number of weeks between
the two dates. If date1 falls on a Monday, DateDiff counts the number of
Mondays until date2. It counts date2 but not date1. If interval is Week
("ww"), however, the DateDiff function returns the number of calendar weeks
between the two dates. It counts the number of Sundays between date1 and
date2. DateDiff counts date2 if it falls on a Sunday; but it doesn't count
date1, even if it does fall on a Sunday.

+---+
Bryan Love
  Database Analyst
  Macromedia Certified Professional
  Internet Application Developer
TeleCommunication Systems
[EMAIL PROTECTED]
+---+

"...'If there must be trouble, let it be in my day, that my child may have
peace'..."
- Thomas Paine, The American Crisis

"Let's Roll"
- Todd Beamer, Flight 93



-Original Message-
From: Lofback, Chris [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 1:14 PM
To: CF-Talk
Subject: DateDiff question


Platform: CF5/Win2K/IIS5

I'm seeing wierd results from DateDiff when using 'ww' (weeks) as the date
part.  Can anyone explain these results?




#DateDiff('ww',d1,d2)#






#DateDiff('ww',d1,d2)#



To me, these should both be 1 week.




#DateDiff('ww',d1,d2)#






#DateDiff('ww',d1,d2)#



I don't know *what* this means.  I thought maybe it was based on ordinal
weeks, but it doesn't seem to be.  Is this expected behavior?

Thanks,
Chris

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


RE: DateDiff question

2003-08-19 Thread Ian Skinner
I just ran your example code on my CFMX 6.0 and got four 1's.  Looks like
you might have a bug that is since been corrected there.  Don't know what
that means to you

--
Ian Skinner
Web Programmer
BloodSource
Sacramento, CA


-Original Message-
From: Lofback, Chris [mailto:[EMAIL PROTECTED]
Sent: Tuesday, August 19, 2003 1:14 PM
To: CF-Talk
Subject: DateDiff question


Platform: CF5/Win2K/IIS5

I'm seeing wierd results from DateDiff when using 'ww' (weeks) as the date
part.  Can anyone explain these results?




#DateDiff('ww',d1,d2)#






#DateDiff('ww',d1,d2)#



To me, these should both be 1 week.




#DateDiff('ww',d1,d2)#






#DateDiff('ww',d1,d2)#



I don't know *what* this means.  I thought maybe it was based on ordinal
weeks, but it doesn't seem to be.  Is this expected behavior?

Thanks,
Chris

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm


Re: DateDiff question

2003-08-19 Thread Jerry Johnson
Datediff

Usage 
To find the number of days between date1 and date2, use Day of Year or Day. 

When datepart is Weekday, DateDiff returns the number of weeks between the two dates. 
If date1 falls on a Monday, DateDiff counts the number of Mondays to date2. It counts 
date2 but not date1. 

*
If interval is Week, however, DateDiff returns the number of calendar weeks between 
the two dates. It counts the number of Sundays between date1 and date2. DateDiff 
counts date2 if it falls on a Sunday; but it doesn't count date1, even if it falls on 
a Sunday. 
*

It is working exactly as designed. (Why is a different question)

Jerry Johnson


>>> [EMAIL PROTECTED] 08/19/03 04:13PM >>>
Platform: CF5/Win2K/IIS5

I'm seeing wierd results from DateDiff when using 'ww' (weeks) as the date part.  Can 
anyone explain these results?




#DateDiff('ww',d1,d2)#






#DateDiff('ww',d1,d2)#



To me, these should both be 1 week.




#DateDiff('ww',d1,d2)#






#DateDiff('ww',d1,d2)#



I don't know *what* this means.  I thought maybe it was based on ordinal weeks, but it 
doesn't seem to be.  Is this expected behavior?

Thanks,
Chris

~|
Archives: http://www.houseoffusion.com/lists.cfm?link=t:4
Subscription: http://www.houseoffusion.com/lists.cfm?link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Get the mailserver that powers this list at 
http://www.coolfusion.com


Re: DateDiff Question (James Blaha)

2003-06-06 Thread James Blaha
Jochem,

Thanks again! All your points were well made.

Regards,
JB


Jochem van Dieten wrote:

>James Blaha wrote:
>  
>
>>Thanks a million! Does the date format have to be in the -mm-dd format?
>>
>>
>
>It doesn't have to be. But you wrote "6/3/03", and I wouldn't know what 
>date that is. I presume the "03" means 2003, but how about the rest? Is 
>that March 6 or June 3? Do you know? Does the next developer know? Does 
>the server know? Does the server know after it has had an upgrade?
>
>Don't take chances, use an unambiguous format. And -mm-dd (or 
>mmdd) has the added advantage that a text sort gives the same result 
>as a date sort.
>
>Jochem
>
>
>
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
http://www.cfhosting.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: DateDiff Question (James Blaha)

2003-06-06 Thread Jochem van Dieten
James Blaha wrote:
> 
> Thanks a million! Does the date format have to be in the -mm-dd format?

It doesn't have to be. But you wrote "6/3/03", and I wouldn't know what 
date that is. I presume the "03" means 2003, but how about the rest? Is 
that March 6 or June 3? Do you know? Does the next developer know? Does 
the server know? Does the server know after it has had an upgrade?

Don't take chances, use an unambiguous format. And -mm-dd (or 
mmdd) has the added advantage that a text sort gives the same result 
as a date sort.

Jochem


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: DateDiff Question (James Blaha)

2003-06-06 Thread James Blaha
Jochem,

Thanks a million! Does the date format have to be in the -mm-dd format?

Regards,
James Blaha



Jochem van Dieten wrote:

>James Blaha wrote:
>  
>
>>Is below the best and only way to easily find out how many days are 
>>between 2 dates? Im writing a template for a file backup where files 
>>that are older then 5 day will be deleted and Im not sure what the 
>>easiest best practice approach would be for the days check.
>>
>>#Abs("#DateDiff("d","6/3/03","#DateFormat(NOW(), 
>>"M/D/YY")#")#")#
>>
>>
>
>6/3/03 is ambiguous, use a format of -mm-dd. You have way to many 
>quotes and ##'s. And you don't need to DateFormat() the Now():
>
>#Abs(DateDiff("d", "2003-03-06", Now()))#
>
>Jochem
>
>
>
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: DateDiff Question (James Blaha)

2003-06-06 Thread Jochem van Dieten
James Blaha wrote:
> 
> Is below the best and only way to easily find out how many days are 
> between 2 dates? Im writing a template for a file backup where files 
> that are older then 5 day will be deleted and Im not sure what the 
> easiest best practice approach would be for the days check.
> 
> #Abs("#DateDiff("d","6/3/03","#DateFormat(NOW(), 
> "M/D/YY")#")#")#

6/3/03 is ambiguous, use a format of -mm-dd. You have way to many 
quotes and ##'s. And you don't need to DateFormat() the Now():

#Abs(DateDiff("d", "2003-03-06", Now()))#

Jochem


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. 
http://www.fusionauthority.com/signup.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Datediff query

2003-06-02 Thread W Luke
"Jochem van Dieten" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]>...
> W Luke wrote:
> > 
> > Now that I'm on MySQL, I don't understand how createtime() works.  
> > The field (TheDate) is DATETIME, and I would need to grab all 
> > records created in the past 24 hours.
> 
> WHERE TheDate >  value="#DateAdd("d",-1,Now())#">
> 
> 
> > I also need similar queries, to find records submitted in the past
30
> > minutes and 60 minutes.Can anyone advise?
> 
> WHERE TheDate >  value="#DateAdd("n",-30,Now())#">
> 
> WHERE TheDate >  value="#DateAdd("n",-60,Now())#">

Superb Jochem, thanks again.  I've lost count of the number of times
you've helped me out :)

Will

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Datediff query

2003-06-01 Thread Jochem van Dieten
W Luke wrote:
> 
> Now that I'm on MySQL, I don't understand how createtime() works.  The
> field (TheDate) is DATETIME, and I would need to grab all records
> created in the past 24 hours.

WHERE TheDate > 


> I also need similar queries, to find records submitted in the past 30
> minutes and 60 minutes.Can anyone advise?

WHERE TheDate > 

WHERE TheDate > 

Jochem


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



Re: Datediff query

2003-06-01 Thread W Luke
Alex,

Sorry I don't understand.  I presume you meant dateadd and not date_add?


Will

"Sicular, Alexander" <[EMAIL PROTECTED]> wrote in message
news:<[EMAIL PROTECTED]
du>...
> Will,
> 
> DATE_ADD(TheDate, INTERVAL -1440 MINUTE)
> 
> Gl,
> alex

W Luke  said on Sunday, June 01, 2003 7:55
AM:

> Hi,
> 
> I used to use Access, and CreateODBCDateTime - and used the following
> to grab all records created in the past day:
> 
> WHERE DATEDIFF ('n',TheDate,#CreateOdbcDatetime(DateAdd("n", -1440,
> now() ) )# ) <= 1 
> 
> Now that I'm on MySQL, I don't understand how createtime() works.  The
> field (TheDate) is DATETIME, and I would need to grab all records
> created in the past 24 hours. 
> 
> I also need similar queries, to find records submitted in the past 30
> minutes and 60 minutes.Can anyone advise?

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Get the mailserver that powers this list at 
http://www.coolfusion.com

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Datediff query

2003-06-01 Thread Sicular, Alexander
You want:

DATE_ADD(NOW(),INTERVAL -1440 MINUTE)

Also :

CURRENT_DATE()
CURRENT_TIME()
NOW()
CURDATE() > '2003-06-01'
CURDATE()+0 > 20030601
CURTIME() > '08:20:45'
CURTIME()+0 > 82045

Gl,
alex

-Original Message-
From: W Luke [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 7:55 AM
To: CF-Talk
Subject: Datediff query


Hi,

I used to use Access, and CreateODBCDateTime - and used the following to
grab all records created in the past day:

WHERE DATEDIFF ('n',TheDate,#CreateOdbcDatetime(DateAdd("n", -1440,
now() ) )# ) <= 1

Now that I'm on MySQL, I don't understand how createtime() works.  The
field (TheDate) is DATETIME, and I would need to grab all records
created in the past 24 hours.

I also need similar queries, to find records submitted in the past 30
minutes and 60 minutes.Can anyone advise?

Sorry for all these questions.

Thanks

Will


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. 
http://www.fusionauthority.com/ads.cfm

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: Datediff query

2003-06-01 Thread Sicular, Alexander
Will,

DATE_ADD(TheDate, INTERVAL -1440 MINUTE)

Gl,
alex

-Original Message-
From: W Luke [mailto:[EMAIL PROTECTED] 
Sent: Sunday, June 01, 2003 7:55 AM
To: CF-Talk
Subject: Datediff query


Hi,

I used to use Access, and CreateODBCDateTime - and used the following to
grab all records created in the past day:

WHERE DATEDIFF ('n',TheDate,#CreateOdbcDatetime(DateAdd("n", -1440,
now() ) )# ) <= 1

Now that I'm on MySQL, I don't understand how createtime() works.  The
field (TheDate) is DATETIME, and I would need to grab all records
created in the past 24 hours.

I also need similar queries, to find records submitted in the past 30
minutes and 60 minutes.Can anyone advise?

Sorry for all these questions.

Thanks

Will


~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: 
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq

Host with the leader in ColdFusion hosting. 
Voted #1 ColdFusion host by CF Developers. 
Offering shared and dedicated hosting options. 
www.cfxhosting.com/default.cfm?redirect=10481

Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4



RE: DateDiff bug?!

2002-10-11 Thread Robert Everland

Weird I had filled in 10/11/2002 in there and it still had the bug. That's
kind of weird that it would work this way.

Robert Everland III
Web Developer Extraordinaire
Dixon Ticonderoga Company
http://www.dixonusa.com 

-Original Message-
From: Chris Edwards [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 11, 2002 3:48 PM
To: CF-Talk
Subject: Re: DateDiff bug?!


I had to do this...

CreateDate( Year(Now()), Month(Now()), Day(Now()) )

instead of...

 Now()

strange

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message -
From: "Robert Everland" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, October 11, 2002 3:13 PM
Subject: RE: DateDiff bug?!


> I am getting the same results in CF5. IS is supposed to be like that?
>
> Robert Everland III
> Web Developer Extraordinaire
> Dixon Ticonderoga Company
> http://www.dixonusa.com
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 3:03 PM
> To: CF-Talk
> Subject: Re: DateDiff bug?!
>
>
> There is a datedif() bug in CFMX. Use the updater to fix it.
>
>
>
> > -
> > 
> > output = "";
> > for( i=7; i LTE 20; i=i+1 )
> >   {
> >   output = output & i & ": " & DateDiff( "D", Now(), CreateDate( 
> > 2002, 10, i ) ) & "";
> >   }
> >
> > 
> >
> > #output#
> > ---
> >
> > 7: -4
> > 8: -3
> > 9: -2
> > 10: -1
> > 11: 0
> > 12: 0   <-  whats is going on here?
> > 13: 1
> > 14: 2
> > 15: 3
> > 16: 4
> > 17: 5
> > 18: 6
> > 19: 7
> > 20: 8
> >
> > Whats up with that?
> >
> >
> > --
> > Chris Edwards
> > Web Application Developer
> > Outer Banks Internet, Inc.
> > 252-441-6698
> > [EMAIL PROTECTED]
> > http://www.OuterBanksInternet.com
> >
> >
> >
>
> 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



Re: DateDiff bug?!

2002-10-11 Thread Chris Edwards

I had to do this...

CreateDate( Year(Now()), Month(Now()), Day(Now()) )

instead of...

 Now()

strange

--
Chris Edwards
Web Application Developer
Outer Banks Internet, Inc.
252-441-6698
[EMAIL PROTECTED]
http://www.OuterBanksInternet.com

- Original Message -
From: "Robert Everland" <[EMAIL PROTECTED]>;
<[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Friday, October 11, 2002 3:13 PM
Subject: RE: DateDiff bug?!


> I am getting the same results in CF5. IS is supposed to be like that?
>
> Robert Everland III
> Web Developer Extraordinaire
> Dixon Ticonderoga Company
> http://www.dixonusa.com
>
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Friday, October 11, 2002 3:03 PM
> To: CF-Talk
> Subject: Re: DateDiff bug?!
>
>
> There is a datedif() bug in CFMX. Use the updater to fix it.
>
>
>
> > -
> > 
> > output = "";
> > for( i=7; i LTE 20; i=i+1 )
> >   {
> >   output = output & i & ": " & DateDiff( "D", Now(), CreateDate( 2002,
> > 10, i ) ) & "";
> >   }
> >
> > 
> >
> > #output#
> > ---
> >
> > 7: -4
> > 8: -3
> > 9: -2
> > 10: -1
> > 11: 0
> > 12: 0   <-  whats is going on here?
> > 13: 1
> > 14: 2
> > 15: 3
> > 16: 4
> > 17: 5
> > 18: 6
> > 19: 7
> > 20: 8
> >
> > Whats up with that?
> >
> >
> > --
> > Chris Edwards
> > Web Application Developer
> > Outer Banks Internet, Inc.
> > 252-441-6698
> > [EMAIL PROTECTED]
> > http://www.OuterBanksInternet.com
> >
> >
> >
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.cfm



RE: DateDiff bug?!

2002-10-11 Thread Robert Everland

I am getting the same results in CF5. IS is supposed to be like that? 

Robert Everland III
Web Developer Extraordinaire
Dixon Ticonderoga Company
http://www.dixonusa.com 

-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]] 
Sent: Friday, October 11, 2002 3:03 PM
To: CF-Talk
Subject: Re: DateDiff bug?!


There is a datedif() bug in CFMX. Use the updater to fix it.



> -
> 
> output = "";
> for( i=7; i LTE 20; i=i+1 )
>   {
>   output = output & i & ": " & DateDiff( "D", Now(), CreateDate( 2002, 
> 10, i ) ) & "";
>   }
>
> 
>
> #output#
> ---
>
> 7: -4
> 8: -3
> 9: -2
> 10: -1
> 11: 0
> 12: 0   <-  whats is going on here?
> 13: 1
> 14: 2
> 15: 3
> 16: 4
> 17: 5
> 18: 6
> 19: 7
> 20: 8
>
> Whats up with that?
>
>
> --
> Chris Edwards
> Web Application Developer
> Outer Banks Internet, Inc.
> 252-441-6698
> [EMAIL PROTECTED]
> http://www.OuterBanksInternet.com
>
>
> 

~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.



RE: DateDiff bug?!

2002-10-11 Thread Ben Doom

IIRC, it's saying that midnight tomorrow is less than 24 hours from now,
just as midnight this morning was less than 24 hrs from now.



  --Ben Doom
Programmer & General Lackey
Moonbow Software

: -Original Message-
: From: Chris Edwards [mailto:[EMAIL PROTECTED]]
: Sent: Friday, October 11, 2002 3:04 PM
: To: CF-Talk
: Subject: DateDiff bug?!
:
:
: -
: 
: output = "";
: for( i=7; i LTE 20; i=i+1 )
:   {
:   output = output & i & ": " & DateDiff( "D", Now(), CreateDate( 2002, 10,
: i ) ) & "";
:   }
:
: 
:
: #output#
: ---
:
: 7: -4
: 8: -3
: 9: -2
: 10: -1
: 11: 0
: 12: 0   <-  whats is going on here?
: 13: 1
: 14: 2
: 15: 3
: 16: 4
: 17: 5
: 18: 6
: 19: 7
: 20: 8
:
: Whats up with that?
:
:
: --
: Chris Edwards
: Web Application Developer
: Outer Banks Internet, Inc.
: 252-441-6698
: [EMAIL PROTECTED]
: http://www.OuterBanksInternet.com
:
:
: 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Your ad could be here. Monies from ads go to support these lists and provide more 
resources for the community. http://www.fusionauthority.com/ads.cfm



Re: DateDiff bug?!

2002-10-11 Thread Michael Dinowitz

There is a datedif() bug in CFMX. Use the updater to fix it.



> -
> 
> output = "";
> for( i=7; i LTE 20; i=i+1 )
>   {
>   output = output & i & ": " & DateDiff( "D", Now(), CreateDate( 2002, 10,
> i ) ) & "";
>   }
>
> 
>
> #output#
> ---
>
> 7: -4
> 8: -3
> 9: -2
> 10: -1
> 11: 0
> 12: 0   <-  whats is going on here?
> 13: 1
> 14: 2
> 15: 3
> 16: 4
> 17: 5
> 18: 6
> 19: 7
> 20: 8
>
> Whats up with that?
>
>
> --
> Chris Edwards
> Web Application Developer
> Outer Banks Internet, Inc.
> 252-441-6698
> [EMAIL PROTECTED]
> http://www.OuterBanksInternet.com
>
>
> 
~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription: http://www.houseoffusion.com/index.cfm?sidebar=lists&body=lists/cf_talk
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
Get the mailserver that powers this list at http://www.coolfusion.com



RE: DateDiff (Still Having Problems)

2002-08-03 Thread Philip Arnold - ASP

> I thought I might have gotten it to work, but I was incorrect.
>
> There are 5 cases in table. Today is August 2nd. I dated 4
> cases with dates of 8/4/2002 to simulate 2 days from due date.
> 1 case is dated 7/31/2002 to simulate over due.
>
> The results I am getting are as follows:
>
> 1 cases are overdue. CORRECT
> 2002-07-31 00:00:00
>
> 1 cases 2 days from due date. HUH???
> 2002-07-31 00:00:00
>
> 4 cases 2 days from due date. CORRECT
> 2002-08-04 00:00:00

Here's what I THINK the problem is;

With DateDiff(), it's working in complete blocks of the DatePart, so if
you choose "d", it's working in whole days

With Now(), it's returning the date and time, not just the date, so you
have to trim off the time part

Try DateDiff("d", DateFormat(Now(),"d mmm "), due_date)

See if that works

Also, remember that it's the difference in days, so since today is Aug
3, Aug 1 is 2 days different, so;
DateDiff("d", Now(), CreateDate(2000,8,1)) = -2 (it was 2 days ago)

Philip Arnold
Technical Director
Certified ColdFusion Developer
ASP Multimedia Limited
Switchboard: +44 (0)20 8680 8099
Fax: +44 (0)20 8686 7911

www.aspmedia.co.uk
www.aspevents.net

An ISO9001 registered company.

**
This email and any files transmitted with it are confidential and
intended solely for the use of the individual or entity to whom they
are addressed. If you have received this email in error please notify
the system manager.
**


__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.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



Re: DateDiff (Still Having Problems)

2002-08-02 Thread James Taavon

I thought I might have gotten it to work, but I was incorrect.

There are 5 cases in table. Today is August 2nd. I dated 4 cases with dates
of 8/4/2002 to simulate 2 days from due date. 1 case is dated 7/31/2002 to
simulate over due.

The results I am getting are as follows:

1 cases are overdue. CORRECT
2002-07-31 00:00:00

1 cases 2 days from due date. HUH???
2002-07-31 00:00:00

4 cases 2 days from due date. CORRECT
2002-08-04 00:00:00



Here is what I have so far.
--


select due_date, count(due_date) AS overduecount
from dbo.tbl_open_cases
group by due_date



select due_date, count(due_date) AS opencasescount
from dbo.tbl_open_cases
group by due_date






#overduecount# cases are overdue.

#due_date#







#opencasescount# cases 2 days from due date.

#due_date#





__
Get the mailserver that powers this list at http://www.coolfusion.com
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



RE: datediff problem

2002-04-24 Thread John McCosker

Ahh!!

I'm not thinking clearly,
numeric differences in day number is what I want.

-Original Message-
From: Matthew Walker [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, April 24, 2002 12:00 PM
To: CF-Talk
Subject: Re: datediff problem


What is wrong with your results? DateDiff counts blocks of 24 hours not
numeric differences in day number. Is that your problem? I find this
counter-intuitive myself.

- Original Message -
From: "John McCosker" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 10:50 PM
Subject: datediff problem


> Greetings,
>
> I am experiencing a problem with datediff function for extracting the day
as
> an integer,
>
> in my query I am outputting the results to test it and as you can see
> datediff is returning the wrong result, it starts off ok then goes pair
> shaped,
>
> 
> #DATEDIFF("d",dt,now())#, #dt#
> 
>
> RESULT
>
> 1, 2002-04-23 10:20:00
> 1, 2002-04-23 09:35:00
> 1, 2002-04-23 08:05:00
> 1, 2002-04-23 07:05:00
> 1, 2002-04-23 06:21:00
> 1, 2002-04-23 05:36:00
> 1, 2002-04-22 22:51:00
> 1, 2002-04-22 22:06:00
> 1, 2002-04-22 21:21:00
> 1, 2002-04-22 20:36:00
> 1, 2002-04-22 19:52:00
> 1, 2002-04-22 19:07:00
> 1, 2002-04-22 17:52:00
> 1, 2002-04-22 16:37:00
> 1, 2002-04-22 15:52:00
> 1, 2002-04-22 15:07:00
> 1, 2002-04-22 13:38:00
> 1, 2002-04-22 12:37:00
> 2, 2002-04-22 11:08:00
> 2, 2002-04-22 10:08:00
> 4, 2002-04-20 10:58:00
> 4, 2002-04-19 22:58:00
> 4, 2002-04-19 19:57:00
> 4, 2002-04-19 15:57:00
> 4, 2002-04-19 12:57:00
> 5, 2002-04-19 09:57:00
> 5, 2002-04-18 19:12:00
> 5, 2002-04-18 18:12:00
> 5, 2002-04-18 17:27:00
> 6, 2002-04-18 11:27:00
> 6, 2002-04-17 19:25:00
> 6, 2002-04-17 14:24:00
> 7, 2002-04-17 11:24:00
> 7, 2002-04-17 04:23:00
> 7, 2002-04-17 01:23:00
> 7, 2002-04-16 21:22:00
> 7, 2002-04-16 17:22:00
> 7, 2002-04-16 13:22:00
> 11, 2002-04-12 18:32:00
> 11, 2002-04-12 17:47:00
> 11, 2002-04-12 16:49:00
> 11, 2002-04-12 14:03:00
> 11, 2002-04-12 13:18:00
> 11, 2002-04-12 12:33:00
> 12, 2002-04-12 11:33:00
>
> has anyone come accross this problem before,
>
> respectfully,
>
> J
> 

__
This list and all House of Fusion resources hosted by CFHosting.com. The place for 
dependable ColdFusion Hosting.
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



Re: datediff problem

2002-04-24 Thread Matthew Walker

What is wrong with your results? DateDiff counts blocks of 24 hours not
numeric differences in day number. Is that your problem? I find this
counter-intuitive myself.

- Original Message -
From: "John McCosker" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Wednesday, April 24, 2002 10:50 PM
Subject: datediff problem


> Greetings,
>
> I am experiencing a problem with datediff function for extracting the day
as
> an integer,
>
> in my query I am outputting the results to test it and as you can see
> datediff is returning the wrong result, it starts off ok then goes pair
> shaped,
>
> 
> #DATEDIFF("d",dt,now())#, #dt#
> 
>
> RESULT
>
> 1, 2002-04-23 10:20:00
> 1, 2002-04-23 09:35:00
> 1, 2002-04-23 08:05:00
> 1, 2002-04-23 07:05:00
> 1, 2002-04-23 06:21:00
> 1, 2002-04-23 05:36:00
> 1, 2002-04-22 22:51:00
> 1, 2002-04-22 22:06:00
> 1, 2002-04-22 21:21:00
> 1, 2002-04-22 20:36:00
> 1, 2002-04-22 19:52:00
> 1, 2002-04-22 19:07:00
> 1, 2002-04-22 17:52:00
> 1, 2002-04-22 16:37:00
> 1, 2002-04-22 15:52:00
> 1, 2002-04-22 15:07:00
> 1, 2002-04-22 13:38:00
> 1, 2002-04-22 12:37:00
> 2, 2002-04-22 11:08:00
> 2, 2002-04-22 10:08:00
> 4, 2002-04-20 10:58:00
> 4, 2002-04-19 22:58:00
> 4, 2002-04-19 19:57:00
> 4, 2002-04-19 15:57:00
> 4, 2002-04-19 12:57:00
> 5, 2002-04-19 09:57:00
> 5, 2002-04-18 19:12:00
> 5, 2002-04-18 18:12:00
> 5, 2002-04-18 17:27:00
> 6, 2002-04-18 11:27:00
> 6, 2002-04-17 19:25:00
> 6, 2002-04-17 14:24:00
> 7, 2002-04-17 11:24:00
> 7, 2002-04-17 04:23:00
> 7, 2002-04-17 01:23:00
> 7, 2002-04-16 21:22:00
> 7, 2002-04-16 17:22:00
> 7, 2002-04-16 13:22:00
> 11, 2002-04-12 18:32:00
> 11, 2002-04-12 17:47:00
> 11, 2002-04-12 16:49:00
> 11, 2002-04-12 14:03:00
> 11, 2002-04-12 13:18:00
> 11, 2002-04-12 12:33:00
> 12, 2002-04-12 11:33:00
>
> has anyone come accross this problem before,
>
> respectfully,
>
> J
> 
__
Signup for the Fusion Authority news alert and keep up with the latest news in 
ColdFusion and related topics. http://www.fusionauthority.com/signup.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



RE: Datediff

2001-11-21 Thread Fiona

sorry, pet peeve: too many pounds, hashes, wahtever you want to call them.
without thinking about whether the function is correct or not, not one of
those #s is necessary:



This article (by Ben Forta) is a little old, but the principles still apply:
http://www.defusion.com/articles/index.cfm?ArticleID=26

Fiona



-Original Message-
From: Tangorre, Michael T. [mailto:[EMAIL PROTECTED]]
Sent: 20 November 2001 16:21
To: CF-Talk
Subject: RE: Datediff


Sorry, I meant:



Mike



-Original Message-
From: Tangorre, Michael T. [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 11:16 AM
To: CF-Talk
Subject: RE: Datediff


Use the ABS funcitons, which will return the positive value. The number is
correct,

Try this:  ABS()

Im not sure on the pounds, but play with it.

Lemme know if this helps.

Mike




-Original Message-
From: Declan Maher [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 11:11 AM
To: CF-Talk
Subject: RE: Datediff


I am having problems comparing two dates.
My question is how to compare two dates that come from different years. For
example if I use the code below to compare a date of  12 Nov 2001 and 28 Feb
2002  to get the date difference I get -257 days.




I have tried other means of doing this but with no success.
Can somebody suggest the correct code to use to compare dates that overlap
years?

Thanks in advance,

Declan maher

-Original Message-
From: Carlisle, Eric [mailto:[EMAIL PROTECTED]]
Sent: 20 November 2001 16:03
To: CF-Talk
Subject: RE: AUTO TABLE WIDTH


 ???

EC

-Original Message-
From: William J Wheatley [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, November 20, 2001 10:51 AM
To: CF-Talk
Subject: Re: AUTO TABLE WIDTH


:) not enough coffee

A  will now SHOW on the browser screen until  it reaches the 
Because it has to read through the whole table to generate Widths and such
but on large tables that can slow down the display of tables by a few
seconds.

Now there is a CODE you put into the page or the table tag that lets the
Browser know this is a PREDEFINED size and to display it on the fly I forget
what that code is any idea?

Thanks all,


Bill Wheatley
Director of Development
Certified Advanced ColdFusion 5 Developer
AEPS INC
Allaire ColdFusion Consulting Partner
www.aeps.com
www.aeps2000.com
954-472-6684 X303
ICQ: 417645
- Original Message -
From: "Bud" <[EMAIL PROTECTED]>
To: "CF-Talk" <[EMAIL PROTECTED]>
Sent: Tuesday, November 20, 2001 10:35 AM
Subject: Re: AUTO TABLE WIDTH


> On 11/20/01, William J Wheatley penned:
> >Whats the Code to AUTOSET the table size of a  so that the
table
> >does not have to get to the  before the table can be
displayed?
>
> What? LOL
> --
>
> Bud Schneehagen - Tropical Web Creations
>
> _/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/_/
> ColdFusion Solutions / eCommerce Development [EMAIL PROTECTED]
> http://www.twcreations.com/
>





~~
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



  1   2   >