On Thu, 20 Jan 2005 22:24:28 -0800, Ian Skinner <[EMAIL PROTECTED]> wrote:
> There was a disussion on this topic in one of the Macromedia Forums.
> The consensus was that dateDiff looks at a 24 hour period, not the
> difference in the day part of the date object, this makes more sense if
> you consider the time component of the data objects
I get the idea that its basically regarding dates has milliseconds
since epoch and converting these values into the given units as
needed.
Your examples are very clear and good and make a lot of sense, what
I'm wondering is why would "2005-04-03 00:00:00" be equal to
"2005-04-04 00:00:00" in CF when MSSQL server returns otherwise, ie:
SELECT dYYYY = dateDiff( yyyy, '2005-04-03 00:00:00', '2005-04-04 00:00:00' )
, dMM = dateDiff( mm, '2005-04-03 00:00:00', '2005-04-04 00:00:00' )
, dDD = dateDiff( dd, '2005-04-03 00:00:00', '2005-04-04 00:00:00' )
, dHH = dateDiff( hh, '2005-04-03 00:00:00', '2005-04-04 00:00:00' )
, dN = dateDiff( n, '2005-04-03 00:00:00', '2005-04-04 00:00:00' )
, dS = dateDiff( s, '2005-04-03 00:00:00', '2005-04-04 00:00:00' )
, dMS = dateDiff( ms, '2005-04-03 00:00:00', '2005-04-04 00:00:00' )
dYYYY = 0
dMM = 0
dDD = 1
dHH = 24
dN = 1440
dS = 86400
dMS = 86400000
I understand what your saying, it's just that it's not what I expected...
--
Marc
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
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:191351
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