To disable comments on posts older than date X in WordPress you can use the snippet below.
Sample mySQL
UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2013-01-01' AND post_status = 'publish'
To disable comments on posts older than date X in WordPress you can use the snippet below.
UPDATE wp_posts SET comment_status = 'closed' WHERE post_date < '2013-01-01' AND post_status = 'publish'
To select entries less than 24 hours old in MySQL you can use the following snippet.
SELECT * FROM TABLENAME WHERE COLUMNNAME >= DATE_SUB(Now(),INTERVAL 24 HOUR)