Ok, so here is how I worked this out. Can this be cleaned up any?
Error ":"
130/60 = 2.167
there's your 2 minutes, then take the remainder (using the modulus
function) the .17 * 60 and round the result?
On 7/3/07, Jim H <[EMAIL PROTECTED]> wrote:
> > > which returns 10:24.
> > >
> > > I need to get the 1:36 now.
> >
> > First off - forget the format. Format mean
> > which returns 10:24.
> >
> > I need to get the 1:36 now.
>
> First off - forget the format. Format means nothing.
>
> I would think the easiest thing to do would be to (conceptually) treat
> every period like it began at exactly midnight. You can then use the
> methods described in my
> which returns 10:24.
>
> I need to get the 1:36 now.
First off - forget the format. Format means nothing.
I would think the easiest thing to do would be to (conceptually) treat every
period like it began at exactly midnight. You can then use the methods
described in my first post to crea
That is the code! Thank you to everyone!
-JH
>This does exactly what you're looking for:
>
>
>
>
>
>#TimeFormat(remaining, "hh:mm")#
>
>- Doug
>
>-Original Message-
>From: Josh Nathanson [mailto:[EMAIL PROTECTED]
>Sent: Monday,
This does exactly what you're looking for:
#TimeFormat(remaining, "hh:mm")#
- Doug
-Original Message-
From: Josh Nathanson [mailto:[EMAIL PROTECTED]
Sent: Monday, July 02, 2007 1:38 PM
To: CF-Talk
Subject: Re: Time Question
> You should be able to do DateAdd to
> You should be able to do DateAdd to do this -
or just use DateDiff as Ian said.
-- Josh
~|
ColdFusion 8 beta â Build next generation applications today.
Free beta download on Labs
http://www.adobe.com/cfusion/entitlement
> I need to get the 1:36 now.
>
> UGH!
You should be able to do DateAdd to do this - create a date for your 12
minutes:
periodlength = CreateDateTime(2000,1,1,0,12,0)
Then, figure out the number of seconds in your submitted time:
secs = minute(mytime) * 60 + second(mytime)
and then subtract sec
which returns 10:24.
I need to get the 1:36 now.
Then all you need is the dateDiff() function which may not be clear in the name
can handle time increments as well as calendar increments.
~|
ColdFusion MX7 by Adobe®
Dynca
>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
>ge
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
That's a nice method Jim.
-Original Message-
From: Jim Davis [mailto:[EMAIL PROTECTED]
Sent: Monday, July 02, 2007 10:43 AM
To: CF-Talk
Subject: Re: Time Question
> I am building a hockey stats application. I need to be able to allow
> the user to enter in any 2-4 numbe
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 sol
> Any thoughts?
Yeah I foresee issues :-)
But to get started you could do something like this to get your numbers
formatted like you said.
#timeformat(thenumber, 'hh:mm')#
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 ti
> 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:24132 = 1:32
>
> I also need to subtract that time fr
Just send it as 24 hour using CreateODBCTime(), access will sort out the
rest.
(I expect someone will tell me I'm wrong here)
Taz
> Hi everyone,
>
> I have a date/time field in Access that is set to 'Short Time' format Ex.
> (5:34 PM). When I enter a time using the CreateTime function in CF how
16 matches
Mail list logo