WeCodeAcademy

How To: Convert Time to Seconds

Excel stores a time as a fraction of a day: noon is 0.5, 6:00 is 0.25. So seconds = fraction x 24 x 60 x 60 = fraction x 86400.

When a time arrives as text such as 01:30:15, pull out the hours, minutes and seconds with LEFT, MID, RIGHT and combine them: hours x 3600 plus minutes x 60 plus seconds.

Exampleexcel
Open in editor »
Quick check

How many seconds are in a day?

Your turn: write the code

Convert the text time in A1 to seconds in B1 (hours x 3600 + minutes x 60 + seconds).

Finish the quick check (and any code exercise) to complete this lesson, or mark it done yourself.

Tip: use the left and right arrow keys to move between lessons.