How to convert a timestamp into custom formated string with timezone in MySQL?
This is how I am selecting the timestamp right now. Its correctly formated, but lacks timezone. updated is the name of the timestamp field.
SELECT DATE_FORMAT(updated, '%e.%c.%Y %T') AS updated FROM table;
returns strings like this:
29.1.2015 12:43:16
Then I tried adding timezone like this, but I am getting NULLs as return values.
SELECT DATE_FORMAT(CONVERT_TZ(updated, 'GMT', 'Europe/Helsinki'), '%e.%c.%Y %T') AS updated FROM table;