> 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

Reply via email to