wp_insert_comment error. puzzled by date value

It turns out that we need to get a date string from our DateTime object and pass that
into the comment_date parameter instead.

$comment_date = $the_date->format(‘Y-m-d H:i:s’);

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