To delete records from a table that have a datetime value in Date_column older than 30 days use this query:
USE Database_name;
DELETE FROM Table_name
WHERE Date_column < GETDATE() - 30
...or this:
USE Database_name;
DELETE FROM Table_name
WHERE Date_column < DATEADD(dd,-30,GETDATE())
To delete records from a table that have a datetime value in Date_column older than 12 hours:
USE Database_name;
DELETE FROM Table_name
WHERE Date_column < DATEADD(hh,-12,GETDATE())
To delete records from a table that have a datetime value in Date_column older than 15 minutes:
USE Database_name;
DELETE FROM Table_name
WHERE Date_column < DATEADD(mi,-15,GETDATE())
From: http://zarez.net/?p=542