
March 1st, 2007, 12:12 PM
|
|
Registered User
|
|
Join Date: Mar 2007
Posts: 1
Time spent in forums: 34 m
Reputation Power: 0
|
|
|
Persistent DateDiff anomaly
I am using the following code to count days and display different items for each day on a calendar.
<cfloop index="idx" from="0" to="#URL.lookahead#">
<cfscript>
DateIndicator=DateAdd("d",#idx#,#TodaysDate#);
DayDifference=DateDiff("d",#PPReferenceDate#,#DateIndicator#);
</cfscript>
The reference date is a day about 40 days ago. The code works great until it "looks ahead" to April 1st, which is 70 days difference. The function then returns "70" for both April 1st and April 2nd. It then continues to count, but DayDifference remains a day off.
Does anybody have any ideas about why this would happen?
(E-Mail address blocked: See forum rules)
678-364-6057
|