Reputation: 602
I'm trying to get up and running using the TIMESTAMP offset functions, as the offset is important for grouping the DAY/WEEK/MONTH/QUARTER/YEAR values in the date functions. I've attempted to do some experiments using the TIMESTAMP function, but it does not seem to be accepting the offset at all.
SELECT DAYOFWEEK(TIMESTAMP("2012-06-24 19:06:56")); //works
SELECT DAYOFWEEK(TIMESTAMP("2012-06-24 19:06:56 -07:00")); //does not work
The non-working TIMESTAMP example is the one that is provided in the documentation. Has anyone been able to successfully work with timezone offsets?
Upvotes: 1
Views: 1694
Reputation: 26617
If you want to translate by a constant hour offset, can you use
DATE_ADD(TIMESTAMP("2012-06-24 19:06:56"), -7, "HOUR")
?
Upvotes: 3