Home > Enterprise >  How to get Satuday's date of previous month in SQL Server? Can someone help me with this query?
How to get Satuday's date of previous month in SQL Server? Can someone help me with this query?

Time:09-22

Suppose now we are in September, I want output of the last Saturday date in the previous month, August, where 28-08-2021 falls under last Saturday of previous month in SQL Server

CodePudding user response:

First, let's talk about how to get the beginning of this month. There are a multiple ways, I find DATEFROMPARTS() the most intuitive (see enter image description here

  • Related