Jes Sie

Jes Sie

  • 744
  • 1.2k
  • 282.2k

How to get previous month/year in SQL Server

Apr 25 2020 3:55 AM
I have this query in my SQL Server :
  1. select right(convert(varchar(10),getdate(),103),7)  
which gaves a result of = 04/2020.
 
Now, how do I get the previous month's result (03/2020)?
 
 Thanks, everyone for your suggestions.

Answers (1)