In MySQL the following will tell you what the date was a month ago:
SELECT DATE_SUB(NOW(), INTERVAL 1 MONTH);
The SQL fiddle.
How can this be done in SQL Server?
try this
SELECT DATEADD(month, -1, GETDATE());
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With