Skip to content

Instantly share code, notes, and snippets.

@yucer-elbt
Created September 6, 2022 08:11
Show Gist options
  • Save yucer-elbt/021e801d985027dae2d3adba329dbae4 to your computer and use it in GitHub Desktop.
Save yucer-elbt/021e801d985027dae2d3adba329dbae4 to your computer and use it in GitHub Desktop.
WITH CTE AS (
SELECT
concat(
substr('20220416T070044.243Z', 1, 4), '-',
substr('20220416T070044.243Z', 5, 2), '-',
substr('20220416T070044.243Z', 7, 2), 'T',
substr('20220416T070044.243Z', 10, 2), ':',
substr('20220416T070044.243Z', 12, 2), ':',
substr('20220416T070044.243Z', 14)
) as ts
)
select from_iso8601_timestamp(ts) from CTE
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment