Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

datetrunc hour snowflake

select to_timestamp('2015-05-08T23:39:20.123-07:00') as "TIMESTAMP1",
       date_trunc('HOUR', "TIMESTAMP1") as "TRUNCATED TO HOUR",
       date_trunc('MINUTE', "TIMESTAMP1") as "TRUNCATED TO MINUTE",
       date_trunc('SECOND', "TIMESTAMP1") as "TRUNCATED TO SECOND";
 
PREVIOUS NEXT
Tagged: #datetrunc #hour #snowflake
ADD COMMENT
Topic
Name
9+4 =