Microsoft Dot Net Master
Microsoft Dot Net Master
Monday, June 22, 2020
How can I select the first day of a month in SQL?
Simple Query:
SELECT DATEADD(m, DATEDIFF(m, 0, GETDATE()), 0)
-- Instead of GetDate you can put any date.
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment