<select name="date">
<cfloop index = "i" from = "-1" to = "-12" step = "-1">
<cfoutput>
<option
value="#dateFormat(dateAdd('m',i,now()),'mm/dd/yyyy')#">#dateFormat(date
Add('m',i,now()),'mm/dd/yyyy')#
</cfoutput>
</cfloop>
</select>

is perfect.

and you can modify what is shown, and what you want in the date
format...above is every 15th of the month.

<select name="date">
<cfloop index = "i" from = "-1" to = "-12" step = "-1">
<cfoutput>
<option
value="#dateFormat(dateAdd('m',i,now()),'mmmm')#">#dateFormat(dateAdd('m
',i,now()),'mmmm')#
</cfoutput>
</cfloop>
</select>

would should the full month and that is it...and you get the picture.

...tony

-----Original Message-----
From: Philip Arnold [mailto:[EMAIL PROTECTED]
Sent: Thursday, April 15, 2004 2:50 PM
To: CF-Talk
Subject: RE: previous months

> From: Tony Weeg
>
> <cfloop index = I from = -1 to = -12>

You would need step="-1" in there as well to get this working
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]

Reply via email to