•3 years
How can I select the first day of a month in SQL?
```plaintext
SELECT DATEADD(month, DATEDIFF(month, 0, @mydate), 0) AS StartOfMonth
```
Will it work?
```plaintext
SELECT DATEADD(month, DATEDIFF(month, 0, @mydate), 0) AS StartOfMonth
```
Will it work?
4 users upvote it!
2 answers