MariaDB: MICROSECOND Function
This MariaDB tutorial explains how to use the MariaDB MICROSECOND function with syntax and examples.
Description
The MariaDB MICROSECOND function returns the microsecond portion of a date value.
Syntax
The syntax for the MICROSECOND function in MariaDB is:
MICROSECOND( date_value )
Parameters or Arguments
- date_value
- A time or datetime value from which to extract the microsecond.
Note
Applies To
The MICROSECOND function can be used in the following versions of MariaDB:
- MariaDB 10
Example
Let's look at some MariaDB MICROSECOND function examples and explore how to use the MICROSECOND function in MariaDB.
For example:
SELECT MICROSECOND('2014-05-19 09:22:05.000001'); Result: 1 SELECT MICROSECOND('2014-05-19 09:22:05.999999'); Result: 999999 SELECT MICROSECOND('2014-05-19'); Result: 0 SELECT MICROSECOND('12:13:06.398475'); Result: 398475 SELECT MICROSECOND('838:11:59.000081'); Result: 81
Advertisements