Friday, February 12, 2016

Re: [google-cloud-sql-discuss] Re: populate time zone table

If you have stored the column to group as a DATETIME or TIMESTAMP type, or if you have stored as a DATE and also have the TIME in a different then it is possible - just convert to the desired timezone with CONVERT_TZ before grouping etc. If you have only stored the DATE and the date was determined in UTC then you cannot do this, as you don't have enough info to determine which day it occured in the desired timezone.

Note that this question actually has nothing Cloud SQL specific - this simply applies to MySQL in general. Because the MySQL community is much larger than the Cloud SQL community you are better off asking questions like this in a general MySQL forum.  I recommend Stack Overflow, where this question was already asked and answered several times.

David

On Thu, Feb 11, 2016 at 11:45 PM, Jaap Taal <jaap@q42.nl> wrote:
I you want to GROUP BY dates in timezone X, but the dates are stored in UTC.

Did anyone ever solve this?

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/cf4c26b2-b9f7-4b33-9e93-6051ebfbca0f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Google Cloud SQL discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to google-cloud-sql-discuss+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/google-cloud-sql-discuss/CAJZK_bZwpcTqhdypL8QELT64vPuc0zzZFYJQ5scauF3EkVga2Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment