MySQL CONVERT_TZ Function

MySQL CONVERT_TZ function is one of the MySQL Date Function, which converts the given DateTime from One time zone to another time zone. Let us see how to use this MySQL CONVERT_TZ function to change the timezones of a date expression with an example.

The basic syntax of the CONVERT_TZ() Function in MySQL is

CONVERT_TZ(Date, from_timezone, to_timezone);

MySQL CONVERT_TZ function Example

In this MySQL example, we used three Date Function statements to convert the given date into different timezones.

SELECT CONVERT_TZ('2019-02-28 23:59:59', '+00:00', '+05:50');

SELECT CONVERT_TZ('2019-02-28 23:59:59', '+00:00', '-05:50');

SELECT CONVERT_TZ('2019-02-28 23:59:59', '+00:00', '+10:30');
MySQL CONVERT_TZ Function 1