snippetMinor
In Snowflake, how do I CAST CURRENT_TIMESTAMP up to the minute only?
Viewed 0 times
thesnowflakecasthowcurrent_timestamponlyminute
Problem
In Snowflake, how do I CAST CURRENT_TIMESTAMP up to the minute only. I don't want seconds, milliseconds, or timezone included in my result.
Solution
You can use TO_CHAR or TO_VARCHAR.
Query,
Query,
select to_char(current_timestamp(), 'YYYY-MM-DD HH24:MI') as new_dt;Code Snippets
select to_char(current_timestamp(), 'YYYY-MM-DD HH24:MI') as new_dt;Context
StackExchange Database Administrators Q#326784, answer score: 3
Revisions (0)
No revisions yet.