0

How does convert_tz works in mysql,while going through some mysql site on web I encountered this function,when I tried replicating it, it is giving me the null value. why isn't this working?. Following is the script

SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET');

this is the output shown on web for convert_tz(),

mysql> SELECT CONVERT_TZ('2004-01-01 12:00:00','GMT','MET');
+---------------------------------------------------------+
| CONVERT_TZ('2004-01-01 12:00:00','GMT','MET')           |
+---------------------------------------------------------+
| 2004-01-01 13:00:00                                     |
+---------------------------------------------------------+
1 row in set (0.00 sec)
Deepesh
  • 820
  • 1
  • 14
  • 32
  • 2
    Try this link : http://stackoverflow.com/questions/2523286/mysql-convert-tz – sagi Jul 13 '16 at 09:50
  • 1
    And check here [CONVERT_TZ(dt,from_tz,to_tz)](https://dev.mysql.com/doc/refman/5.5/en/date-and-time-functions.html#function_convert-tz) – Blank Jul 13 '16 at 09:51
  • You can accept the duplicate call-out at the top of your question. – Drew Jul 13 '16 at 10:16

0 Answers0