Snowflake Vs MS-SQL - Part 72 - First Sunday Of The Month

        



First Sunday Of The Month

Sometimes, you have to calculate the first day of the month, like the first Sunday. You have to use that date for further calculation or filtering.

Suppose you are running the query today, i.e., 28-Jun-2025, and if you want to know the date of the 1st Sunday of this month, i.e., 01-Jun-2025.

MS-SQL Server 

We can achieve this as follows:





In Snowflake, we can use a similar approach





For more details, you can refer to the following: DATE_TIME
.


Yogesh Shinde

LinkedInProfile

<<< Back Next >>> 

Comments

Popular posts from this blog

Snowflake Vs MS-SQL - Part 36 - SPLIT_TO_TABLE

Snowflake Vs MS-SQL - Part 63 - ON Clause & Cross Join

Snowflake Vs MS-SQL - Part 33 - INITCAP