MySQL Microsecond Date Function will return the microseconds from the given time or DateTime expression, and the syntax is as shown below:
MICROSECOND(DateTime or time expression);
MySQL Microsecond function Example
These examples help you understand the use of this Microsecond function. Here, we are returning the Microseconds from the time expression, and the Date & time expression.
SELECT MICROSECOND('2019-02-14 10:12:22.223156');
Let us see another example of this Date method. Here, we are trying to return the Microseconds from the datetime returned by the Now(), and UTC_TIMESTAMP function.
From the below screenshot (’12:12:62.123160′), means we are trying to get a micro second from an invalid date. That’s why MySQL returns NULL.