Terry, Try this: <cfoutput>#minute(now())#</cfoutput> <cfset theminute = minute(now())> <cfset roundedhour = hour(now())> <cfif theminute lte 7> <cfset roundedMinute = 0> <cfelseif theminute lte 23> <cfset roundedMinute = 15> <cfelseif theminute lte 37> <cfset roundedMinute = 30> <cfelseif theminute lte 53> <cfset roundedMinute = 45> <cfelse> <cfset roundedhour = hour(now())+1> <cfset roundedMinute = 0> </cfif> <cfset theroundedtime=createDateTime(year(now()),month(now()),day(now()),roundedhou r,roundedMinute,0)> <cfoutput>#theroundedtime#</cfoutput>
There probably a better way that someone else may suggest, but for now you can start with the one above. Hth, Michael > -----Original Message----- > From: Terry Troxel [mailto:[EMAIL PROTECTED] > Sent: Sunday, June 01, 2008 5:11 AM > To: CF-Talk > Subject: Time Rounding > > I have been asked to write a time clock application and am having trouble > figuring how to round time to 15 minute increments based upon a punch time > as our mechanical time clock does. > > Any help would be appreciated. > > Terry Troxel > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to date Get the Free Trial http://ad.doubleclick.net/clk;192386516;25150098;k Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:306796 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4