Right, assuming Datestamp is a unix timestamp (if it's not I'm sure you can find a function to convert it to such with whichever DBMS you're using) and TIME() gives the current unix timestamp.
DELETE FROM table WHERE Datestamp<TIME()-(86400*31)
86400 is the number of seconds in a day.