I can't figure out how to take this ISO8601 date and convert it to local time (PDT).
I've tried a couple things:
convert(datetime, updated_at_text, yyyy-mm-ddThh:mi:ss.mmmZ) as LastUpdated,
convert(datetime, updated_at_text, yyyy-mm-ddThh:mi:ss.mmmZ-0700) as LastUpdated,
cast(updated_at_text as DATETIME) as LastUpdated,
cast(updated_at_text as DATETIME) as LastUpdated,
The updated_at_text lives in an ISO format 2019-05-08T02:47:05Z
The convert functions throw an error & the cast functions don't change the time to Pacific timezone.
CONVERT(CHAR(10),c.EventDate AT TIME ZONE 'Central Standard Time' AT TIME ZONE 'Central European Standard Time',104)
Also watch this if you dont know the 104 docs.microsoft.com/en-us/sql/t-sql/functions/… – Johannes Schapdick May 8 '19 at 8:54