Subtract seconds from a time

You can subtract (or add) a number of seconds from a time using fractions.
Dates are represented as sequential whole numbers so 1 hour is equivalent to the fraction (1/24).
Times are represented as fractions based on there being 24 hours in a day.
1 Hour is 1/24 = 0.04166
1 Minute is 1/(24*60) = 1/1440
1 Second is 1/(24*60*60) = 1/86400


Cell "A1" displays the current date. Custom format "dddd dd mmmm yyyy".
Cell "A2" displays the current date and time. Custom format "dddd dd mmmm yyyy hh:mm:ss".
Cell "A3" displays the current time minus 200 seconds.
Cell "A4" displays the current time minus 200 seconds using the TIME function to return the correct decimal.
Cell "A5" displays the current time minus 40 minutes and 50 seconds.
Cell "A6" displays the current time minus 40 minutes and 50 seconds using the TIME function to return the correct decimal.
Cell "A7" displays the current time minus 3 hours, 15 minutes and 30 seconds.
Cell "A8" displays the current time minus 3 hours, 15 minutes and 30 seconds using the TIME function to return the correct decimal.
All these cells have been formatted with the custom number format "dddd, dd mmmm, yyyy hh:mm AM/PM".

 A
1=TODAY() = Thursday 09 July 2020
2=NOW() = Thursday 09 July 2020 12:28:52
3=A2-(200*(1/86400)) = Thursday, 09 July, 2020 12:25 PM
4=A2-TIME(0,0,200) = Thursday, 09 July, 2020 12:25 PM
5=A2-(40/1440)-(50/86400) = Thursday, 09 July, 2020 11:48 AM
6=A2-TIME(0,40,50) = Thursday, 09 July, 2020 11:48 AM
7=A2-(3/24)-(15/1440)-(30/86400) = Thursday, 09 July, 2020 09:13 AM
8=A2-TIME(3,15,30) = Thursday, 09 July, 2020 09:13 AM

Built-in Functions

NOW - The serial number of the current system date and time.
TIME - The time as a decimal given an hour, minute, second.
TODAY - The serial number representing today's date.


Related Formulas

Subtract hours from a time
Subtract minutes from a time
Add seconds to a time


© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited Top