Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Time format conversion

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 50
Default Time format conversion

=(162-MOD(162,60))/60 & ":" & MOD(162,60)

"mftr" wrote:

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.

  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Time format conversion

Hi,

divide by 86400 (Seconds in a day) and format as mm:ss

Mike

"mftr" wrote:

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Time format conversion

Another solution:
=TIME(0,0,162)

and format as mm:ss

Regards,
Stefi

€˛Mike H€¯ ezt Ć*rta:

Hi,

divide by 86400 (Seconds in a day) and format as mm:ss

Mike

"mftr" wrote:

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.

  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 11,501
Default Time format conversion

Stefi,

That's fine for small numbers but falls over at 32768 seconds or 9h 6m 8s.
(2^15 or 111111111111111). Excel uses 15 bits for storing time which is a
maximum of 32768 numbers. Because time uses 0 then 32767 is the maximum value
accepted.

Mike

"Stefi" wrote:

Another solution:
=TIME(0,0,162)

and format as mm:ss

Regards,
Stefi

€˛Mike H€¯ ezt Ć*rta:

Hi,

divide by 86400 (Seconds in a day) and format as mm:ss

Mike

"mftr" wrote:

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.



  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Time format conversion

Thanks Mike for the warning, you are right as far as theoretical base is
concerned. I think that in practice Time function still can be of good use,
because I can hardly imagine data given in seconds exceeding 32767 seconds.
Nonetheless, user has to be aware of this constraint and decide if his
application can tolerate it or not!

Regards,
Stefi


€˛Mike H€¯ ezt Ć*rta:

Stefi,

That's fine for small numbers but falls over at 32768 seconds or 9h 6m 8s.
(2^15 or 111111111111111). Excel uses 15 bits for storing time which is a
maximum of 32768 numbers. Because time uses 0 then 32767 is the maximum value
accepted.

Mike

"Stefi" wrote:

Another solution:
=TIME(0,0,162)

and format as mm:ss

Regards,
Stefi

€˛Mike H€¯ ezt Ć*rta:

Hi,

divide by 86400 (Seconds in a day) and format as mm:ss

Mike

"mftr" wrote:

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.

  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2
Default Time format conversion

Thank you EricBB, Mike H and Stefi for your quick responses; each of your
suggestions made it work like a charm.

mftr

"Mike H" wrote:

Hi,

divide by 86400 (Seconds in a day) and format as mm:ss

Mike

"mftr" wrote:

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.

  #8   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 2,646
Default Time format conversion

You are welcome! Thanks for the feedback!
Stefi

€˛mftr€¯ ezt Ć*rta:

Thank you EricBB, Mike H and Stefi for your quick responses; each of your
suggestions made it work like a charm.

mftr

"Mike H" wrote:

Hi,

divide by 86400 (Seconds in a day) and format as mm:ss

Mike

"mftr" wrote:

How can I convert a three digit seconds figure to minutes and seconds in a
mm:ss format (i.e. 162 seconds as 2:42)? I can get the right raw number by
dividing by 1440, but that seems to produce an h:mm format, albeit with the
right digits.

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Time Format Conversion Telobamipada Excel Worksheet Functions 3 August 24th 07 01:37 AM
time conversion thisguy Excel Discussion (Misc queries) 2 January 16th 07 04:29 AM
Time conversion PivotMan Excel Worksheet Functions 1 October 14th 05 12:00 AM
Time conversion Dave Excel Discussion (Misc queries) 1 September 12th 05 01:49 PM
time conversion Steane Excel Discussion (Misc queries) 3 August 18th 05 02:34 AM


All times are GMT +1. The time now is 05:55 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"