Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / July 2006

Tip: Looking for answers? Try searching our database.

Time conversion problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Jennifer Ehrlich - 28 Jul 2006 03:25 GMT
I am trying to write some data analysis macro code and am having problems
with how Excel is and isn't storing the times. During a study a researcher
enters, for example 4:39. That needs to be 4 minutes and 39 seconds.
However, Excel formats it as 4 hours and 39 minutes - as "h:mm". I really
want it formatted as "hh:mm:ss" so it would be 00:04:39. If I go in and
change the cell format to "hh:mm:ss" it simply writes the value out as
4:39:00. I've tried switching back and forth between various date, general,
and text formats to no avail.

For a number of reasons, I may very well be stuck with not being able to
tell Excel in advance to format the cell as "hh:mm:ss" or get the
researchers to enter it in a long form so need to solve this through macro
code. How can I translate the 4 hours and 39 minutes in to 4 minutes and 39
seconds (ideally in the format of 00:04:39)?

Jenny
Ron Rosenfeld - 28 Jul 2006 04:19 GMT
>I am trying to write some data analysis macro code and am having problems
>with how Excel is and isn't storing the times. During a study a researcher
[quoted text clipped - 12 lines]
>
>Jenny

So long as your researchers are unambiguous in how the enter the data, and that
4:39 is always going to be 4 minutes 39 seconds, all you need to do is divide
their entries by 60.

Format as hh:mm:ss

--ron

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.