New answers tagged

2

You should use date_i18n(): $timestamp = get_post_meta($post_to_edit->ID, '_single_date', true); $friendly_date = date_i18n( get_option('date_format'), $timestamp ); ?><input value="<?= $friendly_date ?>" name="_single_date" />


2

Assuming you want 24 hour time, you want something like jS M Y H:i:s. You can check wordpresses own Formatting Date and Time reference for further details.



Top 50 recent answers are included