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>

<html>
<head>
         <title>Untitled</title>
</head>

<body>
<cfset arbitrarynow=createodbcdate("11-28-2001")>
<cfoutput>#dateformat(now(), "mm/dd/yyyy")# - 
#dateformat(session.cycledate, "mm/dd/yyyy")# = #DateDiff("d", now(), 
session.cycledate)#</cfoutput><br>
<cfoutput>#dateformat(arbitrarynow, "mm/dd/yyyy")# - 
#dateformat(session.cycledate, "mm/dd/yyyy")# = #DateDiff("d", 
arbitrarynow, session.cycledate)#</cfoutput><cfabort>



</body>
</html>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
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/[email protected]/
Unsubscribe: http://www.houseoffusion.com/index.cfm?sidebar=lists

Reply via email to