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?

<CFSET d1 = "08/3/2003">
<CFSET d2 = "08/10/2003">
<CFOUTPUT>
        <P>#DateDiff('ww',d1,d2)#
        <!--- Result: 1 --->
</CFOUTPUT>

<CFSET d1 = "08/4/2003">
<CFSET d2 = "08/11/2003">
<CFOUTPUT>
        <P>#DateDiff('ww',d1,d2)#
        <!--- Result: 0 --->
</CFOUTPUT>

To me, these should both be 1 week.

<CFSET d1 = "1/1/2003">
<CFSET d2 = "1/11/2003">
<CFOUTPUT>
        <P>#DateDiff('ww',d1,d2)#
        <!--- Result: 0 --->
</CFOUTPUT>

<CFSET d1 = "1/1/2003">
<CFSET d2 = "1/12/2003">
<CFOUTPUT>
        <P>#DateDiff('ww',d1,d2)#
        <!--- Result: 1 --->
</CFOUTPUT>

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

Reply via email to