SECOND

SECOND(serial_number)

Returns the number of seconds as an integer given a date serial number.

serial_numberThe time that contains the seconds you want to find.

REMARKS
* This function returns a number between 0 and 59.
* The "serial_number" can be a time, value, cell reference or a text string in a time format.
* Times may be entered as text strings within quotation marks, as decimal numbers or as results of other formulas or functions.
* If "serial_number" < 0, then #NUM! is returned.
* If "serial_number" is not a valid time or date, then #VALUE! is returned.
* If you want to enter a static time that will not change or update, use the shortcut key (Ctrl + Shift + ;).
* You can use the DATE function to return the date serial number given a YEAR, MONTH, DAY.
* You can use the HOUR function to return the hour as an integer given a date serial number.
* You can use the MINUTE function to return the minute as an integer given a date serial number.
* You can use the NOW function to return the serial number of the current system date and time.
* You can use the TIME function to return the time as a decimal given the hour, minute, second.
* You can use the TIMEVALUE function to return the time as a decimal given a time in text format.
* You can use the TODAY function to return the serial number of the current system date.
* The equivalent VBA function is VBA.SECOND
* For the Microsoft documentation refer to support.microsoft.com
* For the Google documentation refer to support.google.com

 AB
1=SECOND(B1) = 1511:30:15
2=SECOND("11:30:15") = 15=NOW() = 19:44:48
3=SECOND("7:45:59 PM") = 59=NOW() = 45383.823
4=SECOND(B2) = 48 
5=SECOND(0.678) = 19 
6=SECOND(TIME(15, 10, 55)) = 55 
7=SECOND(TIMEVALUE("6:45:22 PM")) = 22 
8=SECOND(0) = 0 
9=SECOND(-10) = #NUM! 
10=SECOND("some text") = #VALUE! 

1 - What is the second component from 11:30:15. This uses the date serial number in cell "B1".
2 - What is the second component from the text string "11:30:15".
3 - What is the second component from the time "7:45:59 PM".
4 - What is the second component from the date displayed in cell "B2". This uses the NOW function to return the current time.
5 - What is the second component from the current time.
6 - What is the second component from the number 0.678. This date serial number represents the date/time "00 Jan 1900 16:16:19".
7 - What is the second component from the time "6:45:22 PM".
8 - What is the second component from the number 0.
9 - If the serial_number is less than zero, #NUM! is returned.
10 - If the serial_number is not numeric, then #VALUE! is returned.

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