CreateTime() does what you want.
<cfloop from="0" to="23" index="hr">
<cfoutput>#TimeFormat(CreateTime(hr,0,0),"hh:mm
tt")#</cfoutput><br />
</cfloop>
-----Original Message-----
From: Andy Matthews [mailto:[EMAIL PROTECTED]
Sent: Thursday, July 06, 2006 9:35 AM
To: CF-Talk
Subject: hour as string representation?
I'm wondering if there's a built in function to do what I want.
I've got some form fields I need duplicated, one for each hour of the
day (1-24). I want to display the label as 12:00 am, 1:00 am, etc. I'm
wondering if there's a function that can take a number value and return
a "string"
representation of it's time of the day; ie: 13 would return "1:00 pm".
I want to think that CF has something like this built in but I can't
find it.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:245505
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54