hh:mm:ss converted to seconds

kreases

Board Regular
Joined
Oct 26, 2005
Messages
114
Office Version
  1. 2016
Platform
  1. Windows
Hi,

I have a spreadsheet for server downtime and I need to convert the downtime from hh:mm:ss to seconds, I have been using a formula but found this doesn't work in certain circumstances like the one below:

down date downtime up date uptime hh:mm:ss seconds
18/09/2006 00:00:00 24/09/2006 23:59:59 167:59:59 0

The seconds column should have calculated 604799 seconds.

I would appreciate any help, thanks.

John.
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
Hi John

If you have start and finsih times, then:

=(Finish-Start)*86400

will give a decimal representing the number of seconds. Start and finish can be references holding these dates/times ie:

=(B1-A1)*86400

Is this what you wanted?

Richard
 
Upvote 0
Richard,

I'm not really sure what that formula does but the start and finish times are across different days and your formula doesn't seem to take account of any day change.

In the example I gave you the downtime total is 167h 59m 59s which appears in a cell as 167:59:59, I want this converted into seconds only.

Regards,

John
 
Upvote 0
John

My apologies - I thought your start and finish values were inclusive date&times. It looks like Fairwinds' has provided a solution.

Richard
 
Upvote 0
Thanks Guys,

I have used the method mentioned by Fairwinds but thanks Richard and Barry for the inputs, I have no doubt I will come back with another problem in the months to come.

Regards,


John
 
Upvote 0

Forum statistics

Threads
1,214,385
Messages
6,119,205
Members
448,874
Latest member
Lancelots

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top