Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-sales domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the better-click-to-tweet domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-amazon domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the pue-stats domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114

Notice: Function _load_textdomain_just_in_time was called incorrectly. Translation loading for the wordpress-seo domain was triggered too early. This is usually an indicator for some code in the plugin or theme running too early. Translations should be loaded at the init action or later. Please see Debugging in WordPress for more information. (This message was added in version 6.7.0.) in /home/staging-poc/public_html/wp-includes/functions.php on line 6114
Change START DATE Date Format | Event Espresso - Staging Server

Support

Home Forums Event Espresso Premium Change START DATE Date Format

Change START DATE Date Format

Posted: September 5, 2013 at 3:49 am

Viewing 4 reply threads


Klaus M

September 5, 2013 at 3:49 am

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 ;(


Dean

  • Support Staff

September 5, 2013 at 4:16 am

Well if the date is in a standard input you could use something like this

http://stackoverflow.com/questions/2487921/convert-date-format-yyyy-mm-dd-dd-mm-yyyy


Klaus M

September 5, 2013 at 5:35 am

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!


Dean

  • Support Staff

September 5, 2013 at 6:26 am

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.

I havent tested this but you could perhaps use the gettext filter http://codex.wordpress.org/Plugin_API/Filter_Reference/gettext


Klaus M

September 5, 2013 at 7:01 am

<?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.

Event Espresso - Staging Server