MySQL CONVERT_TZ Function

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

The basic syntax of the CONVERT_TZ Function is

CONVERT_TZ(Date, from_timezone, to_timezone);

MySQL CONVERT_TZ Example

In this example query, we used three method 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