Well since its hockey YOU might know :-) I have no clue about hockey. ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. Bobby Hartsfield http://acoderslife.com
-----Original Message----- From: Judah McAuley [mailto:[EMAIL PROTECTED] Sent: Monday, July 02, 2007 12:23 PM To: CF-Talk Subject: Re: Time Question Well, since its hockey, you know that there are 20 minutes in a period, so any numbers greater than 20 (ie 36) are going to be seconds (00:36) but two digit numbers 20 or less are going to be an area that needs more definition. Is 18 supposed to be 18:00 or 00:18? I think that needs to get solved before tackling any other parts of the problem. Judah Bobby Hartsfield wrote: >> Any thoughts? > > Yeah I foresee issues :-) > > But to get started you could do something like this to get your > numbers formatted like you said. > > <cfset thenumber = "123" /> > <cfset thenumber = left(numberformat(thenumber, "0000"), 2) & ":" & > right(numberformat(thenumber, "0000"), 2) /> > <cfoutput>#timeformat(thenumber, 'hh:mm')#</cfoutput> > > That should give you 01:23 > > The problem with that would be that a number like 20 would get > converted to 00:20 and when timeformatted, it would convert to 12:20 > > > ..:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:.:. > Bobby Hartsfield > http://acoderslife.com > > -----Original Message----- > From: Jim H [mailto:[EMAIL PROTECTED] > Sent: Monday, July 02, 2007 10:41 AM > To: CF-Talk > Subject: Time Question > > I am building a hockey stats application. I need to be able to allow > the user to enter in any 2-4 numbers. I then need a way to convert > the 2-4 numbers into a time format. Will the TimeFormat function do this? EX: 24 > = 00:24 132 = 1:32 > > I also need to subtract that time from another time to get the correct > score time. > EX: 12:00 - 3:00 = 9:00 12:00 - 3:32 = 8:28 > > Any thoughts? > > Thanks in advance! > > Jim H > > > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Macromedia ColdFusion MX7 Upgrade to MX7 & experience time-saving features, more productivity. http://www.adobe.com/products/coldfusion?sdid=RVJW Archive: http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:282724 Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

