LAdProg2005
Programmer
Hello,
i am in need of help again. somehow i am not getting the correct dates to output8/16 to 8/22 8/9 to 8/15 8/2 to 8/8 7/26 to 8/1 )
Start and end dates of the week is ok but i am getting confused with the loop i think...
<cfset weeks = 4>
<cfset todayDt = Fix( Now() ) />
<cfset stWeek = (todayDt - DayOfWeek( todayDt ) + 1) />
<cfset endWeek = (todayDt + (7 - DayOfWeek( todayDt ))) />
<cfloop index="i" from="1" to="#weeks#">
<cfset formD = #DateAdd("d", stWeek-(7*i), todayDt)# >
<cfset formDt = #DateAdd("d",endWeek+6-(7*i),todayDt)#>
</cfloop>
thanks
i am in need of help again. somehow i am not getting the correct dates to output8/16 to 8/22 8/9 to 8/15 8/2 to 8/8 7/26 to 8/1 )
Start and end dates of the week is ok but i am getting confused with the loop i think...
<cfset weeks = 4>
<cfset todayDt = Fix( Now() ) />
<cfset stWeek = (todayDt - DayOfWeek( todayDt ) + 1) />
<cfset endWeek = (todayDt + (7 - DayOfWeek( todayDt ))) />
<cfloop index="i" from="1" to="#weeks#">
<cfset formD = #DateAdd("d", stWeek-(7*i), todayDt)# >
<cfset formDt = #DateAdd("d",endWeek+6-(7*i),todayDt)#>
</cfloop>
thanks