Datediff returns the number of complete units between the dates given. Daylight savings time starts inside your 'incorrect' ranges in the US-and thus the host server, and you're coming up 1 hour short for that time change.
Off the top of my head, you could change the Datediff unit to hours, divide by 24 and round that result into "days." On Tue, Mar 2, 2010 at 8:50 PM, Les Mizzell <[email protected]> wrote: > > Kevin Pepperman wrote: > > I did not test it, but maybe try changing it to this? > > *<cfset req.daysAway = DateDiff("D",req.departdate,req.returndate)+1 >* > > Nope - that's not it... > > Here's a couple of test: > > March 9 to March 20 comes out incorrectly as 11 days > March 10 to March 20 comes out incorrectly as 10 days > March 10 to March 30 comes out *correctly* as as 21 days > > Checking the database - the dates ARE getting entered there correctly. > > > > __________ Information from ESET NOD32 Antivirus, version of virus > signature database 4910 (20100302) __________ > > The message was checked by ESET NOD32 Antivirus. > > http://www.eset.com > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| 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:331286 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

