I want to select all the records in a table where their date of entry is older then 2 months.
Any idea how I can do that?
I haven't tried anything yet but I am on this point:
SELECT COUNT(1) FROM FB WHERE Dte > GETDATE()
If you are using SQL Server try this:
SELECT * FROM MyTable WHERE MyDate < DATEADD(month, -2, GETDATE())
Based on your update it would be:
SELECT * FROM FB WHERE Dte < DATEADD(month, -2, GETDATE())
2.1m questions
2.1m answers
60 comments
57.0k users