get the post_date of ID

You may please use <?php $pfx_date = get_the_date( $format, $post_id ); ?> to get the date

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