I need to calculate the time zone converter from UTC to LOS Angelas time when the time zones change i know i need to use the following but I have no idea how to implement it into my query can you help.
IF(
CONVERT_TZ("timestamp_column", '+00:00', '-06:00') between
DATE_ADD(NEXT_WEEKDAY(DATE_SUB(TIMESTAMP(CONCAT(YEAR("timestamp_column"),'-03-01
02:00:00')), INTERVAL '1' DAY),1), INTERVAL '7' DAY) and
NEXT_WEEKDAY(DATE_SUB(TIMESTAMP(CONCAT(YEAR("timestamp_column"),'-11-01
01:59:00')), INTERVAL '1' DAY),1) , CONVERT_TZ("timestamp_column",
'+00:00', '-05:00'), CONVERT_TZ("timestamp_column", '+00:00',
'-06:00'))
My query is
SELECT
convert_tz("Date and Time" ,'+5:30','+10:00') As "Date",
SUM("Ac-ft") AS "Foothill Ditch Acre-ft",
AVG("data.f100") AS "Foothill Ditch Average",
MAX("data.f100") AS "Foothill Ditch MAX",
MIN("data.f100") AS "Foothill Ditch MIN"
FROM "ALL-BAA289-Foothill Ditch"
Group By "Date and Time"