Skip to content

MICROSECOND

  • expression: This parameter is required and specifies the time value for which to return the microsecond part. For example, if the provided time value is ‘2009-05-18 15
SELECT MICROSECOND('2022-03-15 12:35:49.123456');
123456

In MySQL, the MICROSECOND() function extracts the microsecond part from a time or datetime value. In the provided example, MICROSECOND('2022-03-15 12:35:49.123456') is used to extract microseconds from the provided datetime value, resulting in the output 123456.