how to select records within the past 12 months in sql server code example Example: sql where last 12 months select Dateadd(Month, -12, GETDATE())