Converting time (MM/DD/YYYY plus HH:MM:SS) to just seconds

sshellan

New Member
Joined
Oct 9, 2016
Messages
2
I have an excel spreadsheet with over 22,000 rows. Each row describes where a deer with a GPS collar was standing at a given time. I need to convert the time data, which is in Zulu, to time data that I can use arithmetically. I'm not sure what this unit is called, but seconds since Jan 1st 1900 sounds good to me.

In my spreadsheet, time is represented by column E in this format: MM/DD/YYY; and column F in this format: HH:MM:SS.

How can I create one time, in seconds since Jan 1st 1900, from these two columns? I am hoping for a marvelous macro.
 

Excel Facts

When did Power Query debut in Excel?
Although it was an add-in in Excel 2010 & Excel 2013, Power Query became a part of Excel in 2016, in Data, Get & Transform Data.
Macro not necessary.
Assuming that the value of each date in column E is as of 12:00am, and the value of each time in column F is a fraction of one day, then :-
=(E1+F1)*86400
 
Upvote 0
Strictly speaking because Excel thinks that the year 1900 was a leap year (when it wasn't) then the number of seconds since 1/1/1900 would be

=(E1+F1)*86400-86400

But it probably doesn't make any difference in this case :biggrin:
 
Last edited:
Upvote 0
Thanks guys, it worked!

My only hiccough was having to make sure the cell was formatted as a number.
 
Upvote 0

Forum statistics

Threads
1,223,895
Messages
6,175,257
Members
452,625
Latest member
saadat28

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