I'm looking for an easy way put SELECT all records that are less than a year old.
Ive got something like this at the moment but i cant seem to concatenate them together.
SELECT DATEPART(yy,GETDATE() - 1 )
SELECT DATEPART(mm,GETDATE())
SELECT DATEPART(dd,GETDATE())
Does anyone know how to stick them together or of a way to get todays date minus 6 months in a less complicated way?
Ive got something like this at the moment but i cant seem to concatenate them together.
SELECT DATEPART(yy,GETDATE() - 1 )
SELECT DATEPART(mm,GETDATE())
SELECT DATEPART(dd,GETDATE())
Does anyone know how to stick them together or of a way to get todays date minus 6 months in a less complicated way?