bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/SQL/SQL References
SQL•SQL References

MySQL SECOND() Function

Concept visual

MySQL SECOND() Function

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Example

Return the seconds part of a datetime value: SELECT SECOND("2017-06-20 09:34:00.000023");

Definition and Usage

Formula

The SECOND() function returns the seconds part of a time/datetime (from 0 to 59).

Syntax

Second(

datetime )

Parameter Values

Parameter

Description datetime

Required. The time or datetime to extract the second from

Technical Details

Works in:

From MySQL 4.0

More Examples

Example

Return the seconds part of a time value: SELECT SECOND("23:59:59");

Previous

❮ MySQL Functions

Next

Previous

MySQL QUARTER() Function

Next

MySQL SEC_TO_TIME() Function