CONVERT_TZ()

Overview

Converts the given DATETIME value from the first time zone to the second time zone.

USAGE

CONVERT_TZ(date_time, timezone_from, timezone_to)

Argument Name

Description

date_time

The datetime to convert

timezone_from

The time zone to covert from

timezone_to

The time zone to covert to

DETAILS

CONVERT_TZ() is a date-time function that converts the given DATETIME value from the first time zone to the second time zone.

A NULL is returned if any argument is NULL.

SYNONYMS

SCHEMA

PARAMETERS

SKYSQL

PRIVILEGES

EXAMPLES

SELECT CONVERT_TZ('2020-01-01 12:00:00', '+00:00', '+5:00') AS result;
+----------------------------+
| result                     |
+----------------------------+
| 2020-01-01 17:00:00.000000 |
+----------------------------+

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