Skip to content

UTC_TIMESTAMP

UTC_TIMESTAMP([fractional_seconds_precision])

Section titled “UTC_TIMESTAMP([fractional_seconds_precision])”
  • fractional_seconds_precision: This parameter determines the number of digits in the fractional part of the SECOND. The value for the parameter can range between 0 and 6, where the default is 0 when it’s not specified. It specifies the microseconds precision to be used in the generated timestamp.
SELECT UTC_TIMESTAMP();
+---------------------+
| UTC_TIMESTAMP() |
+---------------------+
| 2022-01-01 12:30:30 |
+---------------------+

The UTC_TIMESTAMP() function returns the current UTC date and time as a value in ‘YYYY-MM-DD HH:MM:SS’ or YYYYMMDDHHMMSS format, depending on whether the function is used in a string or numeric context.