[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference subsys::excel

Title:Microsoft Excel User Hints and Kinks
Moderator:FIEVEL::FILGATE
Created:Thu May 27 1993
Last Modified:Fri Jun 06 1997
Last Successful Update:Fri Jun 06 1997
Number of topics:483
Total number of notes:1391

474.0. "Converting seconds in HH:MM:SS" by IMPERO::BELLONI (CHMP = Change mode to Paraglide) Tue Mar 18 1997 08:54

	Hello,

	I hve a beginner (I hope) question: computing a estimated time
fa abackup, I get the result in a cell, expressed in seconds (ie. 3723).
I would like to transform this number of seconds in a value as HH:MM:SS.

	Can anybody help me? 

	Many thanks in advance!

							Max
T.RTitleUserPersonal
Name
DateLines
474.1BUSY::SLABAntisocialTue Mar 18 1997 11:129
    
    	"Help" doesn't seem very helpful in this case, that's for sure.
    
    	But it apears that any number formatted with a time mask is assumed
    	to be hours, and "Time" itself appears to be not an elapsed time
    	field but more a specific time field [like 10:00AM].
    
    	Maybe a simple x/60 for minutes or x/3600 for hours would do?
    
474.2Macro?IMPERO::BELLONICHMP = Change mode to ParaglideWed Mar 19 1997 02:2623
	Hello,

>    	"Help" doesn't seem very helpful in this case, that's for sure.
    
	Well, at least now I know that mine wasn't a so silly question.

>    	But it apears that any number formatted with a time mask is assumed
>    	to be hours, and "Time" itself appears to be not an elapsed time
>    	field but more a specific time field [like 10:00AM].

	Exactly: seem that Excel does no implemet the simple concept of
	elapsed time

>    	Maybe a simple x/60 for minutes or x/3600 for hours would do?

	I would like to have a macro, so to call it from several points in
	the folder. Anyway, also forgetting the seconds, to implement the 
	simplest solution means a relatively complicated solution (intended
	as a single cell formula). IMHO a macro should be definitely the 
	best solution (by the way, reusable in other occasions.

					Max

474.3There may be a time format!?!DV780::THURYMaking it so...Tue Mar 25 1997 10:3410
    I'm not sure if this is what you want/need, but if I select
    FORMAT->CELLS menu then click the number tab, pick the "time" category,
    I see a format of the form [h]:mm:ss.  This seems to "restrict" the
    format to hh:mm:ss, even even reporting greater than 24 hours 
    (e.g. 31:24:43)
    
    I'm running Excel 5.0a on MacOS 7.5.5
    
        Regards,
          Denny
474.4convert seconds to days firstASDG::IDEMy mind's lost in a household fog.Fri Mar 28 1997 14:569
    Excel assumes the number you entered is in days when you format time. 
    For example, entering 0.75 and picking the format given in .3, Excel
    will display 18:00:00, which is 0.75 of a day.  What you need to do is
    convert seconds into days by dividing by 86400 (no. of seconds in a
    day).  Then use the format in reply .3 to display the result in
    h:mm:ss.  To apply that format, pick format cells, number tab, custom,
    and click on [h]:mm:ss.
    
    Jamie