As others have pointed out, it's an issue of Whole Days. Think of it this way, 
you are testing number of days between Now() and tomorrow's date, right?  Well, 
Now() includes the time, so not just '11/04/2008', but right now it's 
'11/04/2008 08:06 EST'. When you test that against '11/05/2008', without a 
time, the system assumes midnight, so '11/05/2008 00:00 EST'. [Assuming that 
the server is in US Eastern time zone, for the purposes of the demonstration.]

>From 08:06 until the next 00:00 is less than 24 hours, so it's Zero Whole 
>Days.  

HTH,
Jason


> Hi,
> 
> Can anybody explain why the return value is '0' when determining the 
> difference in dates between today and tommorow? 
> 
> IE...
> 
> <cfset showdiff = #datediff('d',now(),'11/04/2008')#>
> 
> <cfdump var="#showdiff#">
> 
> What i interpret from the datediff statement is that I need the 
> difference in (days) between now() which is 11/03/2008 and 11/04/2008...
> Should be 1...Keep getting 0.
> 
> Any ideas? 


~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:314805
Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to