1

I have two columns in a MySQL database table, which already had data in CST time format.

I want to convert those data from CST to GMT+2 (update current data).

Here's what I did using "CONVERT_TZ()" function as in this reference: http://www.w3resource.com/mysql/date-and-time-functions/mysql-convert_tz-function.php

UPDATE `table` SET `date` = (SELECT date(CONVERT_TZ(CONCAT(`date`, ' ', `time`), '+16:00', '+02:00'))), `time` = (SELECT time(CONVERT_TZ(CONCAT(`date`, ' ', `time`), '+16:00', '+02:00')))

But I get NULL result, as it doesn't recognize '+16:00'.

Any suggestions?

CairoCoder
  • 3,091
  • 11
  • 46
  • 68

0 Answers0