Daysinmonth() requires a date as a parameter. It'll give you the number of days for the relevant month. E.g. daysinmonth(now()) = 28. For your code, you probably don't know which month so it's best left as 31 I'm guessing.
----- Original Message ----- From: "Tim Laureska" <[EMAIL PROTECTED]> To: "CF-Talk" <[EMAIL PROTECTED]> Sent: Wednesday, February 19, 2003 9:24 AM Subject: days in a month > Hello. I'm trying to simplify the code for a drop down list of total # > of possible days in a month (31). to look something like what I'm using > to display months in a year, which looks like this: > <select name="firstmonth" size="1"> > <cfloop index="firstmonth" FROM="1" TO="12"> > <cfoutput> > <option value="#firstmonth#">#MonthasString(firstmonth)# > </cfoutput> > </cfloop> > </option> > </select> > > I tried the code below but it only returns the number 31 in the drop > down box (I'm not sure this function was meant for this type of thing > anyway): > > <select name="firstday"> > <cfloop index="firstday" FROM="1" TO="31"> > <cfoutput> > <option value="#firstday#">#daysinmonth(firstday)# > </cfoutput> > </cfloop> > </option> > </select> > > Tim > > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4 Subscription: http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4 FAQ: http://www.thenetprofits.co.uk/coldfusion/faq Get the mailserver that powers this list at http://www.coolfusion.com Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4