trying to parse "06/01/2010 15:00:00 08:00"
the problem is the last offset hour, mysql str_to_date can't parse it, any idea?
views:
29answers:
1
+1
A:
You need to use the CONVERT_TZ function, but you didn't specify what timezone you want to convert the datetime to:
CONVERT_TZ(STR_TO_DATE(LEFT('06/01/2010 15:00:00 08:00', 20), '%m/%e/%Y %H:%i:%s'),
CONCAT('+', RIGHT('06/01/2010 15:00:00 08:00', 6)),
?)
You need to replace the ?
with the appropriate timezone info.
OMG Ponies
2010-06-14 18:32:02