How to display a certain template element only for posts published within certain time range?

Sure, you can do something like this in your template code:

<?php
    $migrate_date = mktime(0,0,0,1,1,2012);
    if ( get_the_date('U') > date('U', $migrate_date) ) {
        echo "<p>New</p>\n";
    } else {
        echo "<p>Old</p>\n";
    }
?>

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)