SYSDATE()

Overview

Returns the system date and time.

USAGE

SYSDATE([precision])

Argument Name

Description

precision

Optional. The fractional seconds precision. Defaults to 0

DETAILS

SYSDATE() is a date-time function that returns the current date and time in the time zone of the system.

The optional precision argument specifies the number of fractional digits to include in the returned value, from 0 to 6. The default of 0 appends no digits and no decimal point in string mode.

The return value is in the YYYY-MM-DD hh:mm:ss format when used in string context. Fractional seconds are appended after a decimal point (".").

The return value is in the YYYYMMDDhhmmss.x format when used in numeric context. The value is always a DOUBLE data type.

Multiple calls to SYSDATE() in a single statement might differ slightly in their return value.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT SYSDATE();
+---------------------+
| SYSDATE()           |
+---------------------+
| 2021-07-06 18:34:39 |
+---------------------+
SELECT SYSDATE()+0;
+---------------------+
| SYSDATE()+0         |
+---------------------+
| 20210706183439.0000 |
+---------------------+
SELECT SYSDATE(6), SYSDATE(6), SYSDATE(6);
+----------------------------+----------------------------+----------------------------+
| SYSDATE(6)                 | SYSDATE(6)                 | SYSDATE(6)                 |
+----------------------------+----------------------------+----------------------------+
| 2021-07-06 18:34:39.219218 | 2021-07-06 18:34:39.219218 | 2021-07-06 18:34:39.219218 |
+----------------------------+----------------------------+----------------------------+

ERROR HANDLING

FEATURE INTERACTION

RESPONSES

DIAGNOSIS

ISO 9075:2016

CHANGE HISTORY

Release Series

History

23.09

  • Present starting in MariaDB Xpand 23.09.1.

6.1

  • Present starting in MariaDB Xpand 6.1.0.

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.0

  • Present starting in MariaDB Xpand 6.0.3.

5.3

  • Present starting in MariaDB Xpand 5.3.13.

Release Series

History

6.1

  • Present starting in MariaDB Xpand 6.1.0.

EXTERNAL REFERENCES