how can i change the DATE FORMAT TO (‘l, d. F Y’) in this query:
<?php
$key_1_value = get_post_meta( get_the_ID(), ‘event_start_date’, true );
// check if the custom field has a value
if( ! empty( $key_1_value ) ) {
echo $key_1_value;
}
?>
Changes in Setting > General, under Date Format have no effect ;(
Wohoo! Works, thanks. But these dates are displayed in english while other dates (like <?php the_date(‘l, d. F Y’); ?>) are shown in German? I need all dates in German. Any idea? Thanks!
It depends on what you are trying to do, there may be an overall simpler way.
However to answer your question, I am assuming it is pulling the date in as the default English, and as it isnt being marked for translation it isnt being translated.
<?php $ee_event_start_date = date_i18n(‘l, d. F Y’, strtotime(get_post_meta( get_the_ID(), ‘event_start_date’, true )));?>
date_i18n instead of date gets the timestamp according to wp settings. thanks!
RESOLVED 🙂
Viewing 4 reply threads
The support post ‘Change START DATE Date Format’ is closed to new replies.
Have a question about this support post? Create a new support post in our support forums and include a link to this existing support post so we can help you.
Support forum for Event Espresso 3 and Event Espresso 4.