Member-only story

Snowflake SQL Dates and Times Cheat Sheet

A quick reference guide to the most used date and time functions in Snowflake SQL

Rebecca Vickery
4 min readOct 9, 2024
Photo by Jon Tyson on Unsplash

A few years ago I wrote a SQL dates and times cheatsheet for Google BigQuery having found myself frequently Googling common functions. These days I’m primarily using Snowflake to query data for data science projects and running into the same issues, so I thought I would create a similar cheatsheet for Snowflake.

The following article isn’t an exhaustive list of every date and time expression but covers those that I most commonly use. We will cover:

  1. Date parts that are regularly used in other date and time functions.
  2. Date and time conversions.
  3. Functions for extracting date and time parts.
  4. Date and time calculations.
  5. Truncating dates and times.

A note on ISO standards: These will be frequently referenced throughout this article so I’m providing a brief explanation here. ISO standards are a globally

--

--

Rebecca Vickery
Rebecca Vickery

Written by Rebecca Vickery

Data Scientist | Writer | Speaker

No responses yet