title: How to get previous month with Azure SQL?
body: <p>I'm starting on azure SQL and I want to convert a string into a date and then retrieve the two months before that date.</p>
  <p>I tried to use DATEADD(month,-2,sysdatetime()) to get the previous two months but dateadd doesn't work.
  &quot;This function is neither a registered temporary function nor a permanent function registered in the database&quot;</p>
  <p>Thank you for your help</p>