Support

Account

Home Forums General Issues How to change date format to native language? Reply To: How to change date format to native language?

  • Hi James

    I’m sure the error lies with me and where I’ve place the code.
    Here is the code I’ve placed in the bottom of the ‘functions php’ file and later in the ‘single event php’ file.

    <?php
    $dateformatstring = “l d F, Y”;
    $unixtimestamp = strtotime(get_field(‘concert_date’));
    echo date_i18n($dateformatstring, $unixtimestamp);
    ?>

    OTHER INFO
    Field name: concert_date
    Wp framework: divi builder
    Plugin for ACF displaying: ACF injector
    Web site language: da_DK