If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Dealing with Seconds in Excel

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-01-06, 13:48
shiva65 shiva65 is offline
Registered User
 
Join Date: Feb 2006
Posts: 46
Dealing with Seconds in Excel

I have an ususual problem in that I have two columns of time and I am trying to get the number of seconds in them. The way that my time format is setup is as follows:
105236
105331

In this example, the difference between the two times is 55 seconds.

Unfortunately, the raw data for my time is as above and is not in an easy format like 10:52:36 and 10:53:31. If it were, I could use one of two formulas like = (c1 - b1,"s") or = (c1 - b1) * 86400.

The problem with the data that I have is that I cannot get Excel to read the formatting of the time data that I have. It basically does not understand the values as a time value. Could someone please give me some suggestions on how to deal with my problem.

The last thing I want to do is to parse through my two columns and do the following:

10 * 3600 = 36000
52 * 60 = 3120
36 * 1 = 36
--------------
39156


10 *3600 = 36000
53 * 60 = 3180
31 * 1 = 31
----------
39211

39211 - 39156 = 55 seconds
Reply With Quote
  #2 (permalink)  
Old 05-02-06, 03:20
Fazza Fazza is offline
Registered User
 
Join Date: Feb 2006
Posts: 113
Shiva,

Excel works in decimal numbers - you have sexagesimal.

Suggest you convert, for example using division and INT - or maybe integer division if using VBA. You can combine the elements (hours, minute, seconds) with the TIME worksheet function and do subtraction in the normal manner.

HTH,
Fazza
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

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