Look at using actual date values. Start with something like 
DateAdd("d",-5,now()) to set you back 5 days, then loop 5 times, each 
time adding one day to your value.

-Ryan

Orlini, Robert wrote:
> I have an interesting dilemma.
>
> I need to populate a Select dropdown field with the past five days. It worked 
> OK until today and it's my coding fault. Right now it is trying to retrieve 
> days 28 to 01 which are none. See loop below.
>
> How do I have it recognize dates as opposed to numbers for the day? I need it 
> to display days 12/28/2006 to 01/02/2007.
>
> <cfset fivedaysbehind= #dateformat(now()-5,"dd")#> (This is 28)
> <cfset day = #dateformat(now()-1,"dd")#> (This is 01)
>
> <cfloop index="i" from="#day#" to="#fivedaysbehind#">
> #i#<br> (This dropdown is blank now)
> </cfloop>
> </cfoutput>
>
> Thank you.
>
> Robert
> HWW
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:265470
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4

Reply via email to