How to get the first day of the month in SQL Server ?


This content was proof-read by Grammarly. You can Try Grammary for FREE

If you want to get the first day of the month of a input datetime variable from a SQL Query , here’s how you do it.

SELECT DATEADD(month, DATEDIFF(month, 0, GetDate()), 0) AS StartMonthDate
image
Newsletter Signup

Subscribe to our weekly newsletter below and never miss the latest product or an exclusive offer.

Newsletter Signup

Subscribe to our weekly newsletter below and never miss the latest product or an exclusive offer.

%d bloggers like this: