Convert custom field date format to “WordPress default”

I don’t see a function to do what you want directly, but it is not hard to retrieve the format that WordPress has configured:

    $df = get_option('date_format');
    $tf = get_option('time_format');

You can then substitute $df wherever you had a hard-coded date format (or $tf for a time format). In your example, that would look like this:

    $timestamp = strtotime($content);
    $df = get_option('date_format');
    $hol_date = sprintf(
        '<time datetime="%1$s">%2$s</time>',
        date('c', $timestamp),
        date($df, $timestamp) );

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