Figured it out. It wasn't a full 24 hours because it was also incorporating the time into the first equation.
At 11:56 AM 11/28/2001 -0800, you wrote: >Can somebody explain why the out put of the below code is >11/28/2001 - 11/30/2001 = 1 >11/28/2001 - 11/30/2001 = 2 > >I am doing a datediff and getting two different end values for the same >numbers?! > > > ><cfset attributes.cycleSDate = #createdate(2001,11,16)#> > ><!---Loop until current upcoming biweekly report is retrieved---> ><cfloop condition="datecompare(attributes.cycleSDate, dateadd('d', -1, >Now())) EQ -1"> > <cfset attributes.cycleSDate=dateadd("d", session.cycledatenum, >attributes.cycleSDate)> ></cfloop> > ><cflock timeout="10" scope="SESSION" type="EXCLUSIVE"> > <cfparam name="session.basedate" default="#attributes.cycleSdate#"> > <cfparam name="session.cycledate" default="#attributes.cycleSdate#"> ></cflock> > >#dateformat(now(), "mm/dd/yyyy")# - #dateformat(session.cycledate, >"mm/dd/yyyy")# = #DateDiff("d", now(), session.cycledate)# >#dateformat(arbitrarynow, "mm/dd/yyyy")# - #dateformat(session.cycledate, >"mm/dd/yyyy")# = #DateDiff("d", arbitrarynow, session.cycledate)# > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Get the mailserver that powers this list at http://www.coolfusion.com FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Archives: http://www.mail-archive.com/cf-talk@houseoffusion.com/ Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists