Name
MICROSECOND()
Synopsis
MICROSECOND(time
)
This function extracts the microseconds value of a given time. It displays the resulting number in six characters, padded with zeros to the right. When a date or datetime is given that does not include a specific value for microseconds, a value of zero microseconds is assumed. Therefore, 000000 is returned. This function is available as of version 4.1.1 of MySQL. Here is an example:
SELECT MICROSECOND('2008-01-11 19:28:45.82') AS 'MicroSecond'; +--------------+ | MicroSecond | +--------------+ | 820000 | +--------------+
Get MySQL in a Nutshell, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.