Dynamically fill a post custom field with post publish date

When you get the date with function get_the_date() you need to pass a $post object or ID as a second parameter:

$date = get_the_date( $date_format, $post );

The first parameter here is the PHP date format. The second – Post ID or WP_Post object

Here is an example that should work:

add_action( 'acf/save_post', 'my_acf_save_post' ); 

function my_acf_save_post( $post_id ) {
    $date = get_the_date( 'Y-m-d H:i:s', $post_id );

    update_field( 'your_meta_key', $date, $post_id ); 
}

Check the documentation on get_the_date() function https://developer.wordpress.org/reference/functions/get_the_date/

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