Excel SECOND function

Summary

The Excel SECOND function is designed to extract the second component from a time value, returning it as a number between 0 and 59. This function is commonly used to isolate the seconds part from a time for various time-based calculations or in combination with other date and time functions.
Syntax
				
					=SECOND(serial_number)
				
			
  • serial_number: A valid Excel time or datetime from which the second is to be extracted.
Return value
A number representing the seconds part of the time, within a range of 0 to 59.

How to use

Use the SECOND function to separate the seconds portion from a time value. The function can be applied to times entered as text (e.g., “5:30:25 PM”), in decimal format, or derived from other formulas or cells containing time.

Examples

Simple SECOND
Basic Seconds Extraction: Extracting the seconds from a specified time:
				
					=SECOND("14:45:30")
				
			
This formula extracts and returns the seconds part of 2:45:30 PM, which is 30.
SECOND and TIME
Adjusting to Specific Minute and Hour: Using SECOND to adjust a time to a specific minute and hour:
				
					=TIME(9, 30, SECOND(A1))
				
			
Assuming A1 contains a time value, this formula sets the hour to 9 and the minute to 30, while keeping the seconds from A1.
SECOND with Date Value
Extracting Seconds from a DateTime Value: Retrieving the seconds component from a combined date and time:
				
					=SECOND(B1)
				
			
If B1 contains a datetime value (e.g., “2021-07-15 16:20:45”), this formula extracts and returns the second part of the datetime, which is 45 in this case.

Additional Notes

  • SECOND is useful for decomposing time data, especially when used with HOUR and MINUTE functions for detailed time analysis.
  • Ensure the input is a recognized Excel time or datetime format to avoid the #VALUE! error.
  • The function operates on a 60-second scale, making it ideal for standard time calculations and analyses.

Related Functions

Excel MINUTE function

The Excel MINUTE function extracts the minute from a time value, returning a number from 0 to 59, useful for time data analysis.

Excel TIME function

The Excel TIME function creates a time from hour, minute, and second components, allowing for custom time construction.

Excel HOUR function

The Excel HOUR function extracts the hour from a time value, returning a number from 0 to 23, ideal for time data analysis.

Content Navigation