WordPress.org

Support

Support » How-To and Troubleshooting » Formatting date in echo get_post_meta

Formatting date in echo get_post_meta

Viewing 2 replies - 1 through 2 (of 2 total)
  • Did you ever get an answer to this question, because I have it too.

    In your example, get_post_meta will only accept a single Custom Field name. Try something like this:

    $start_date = get_post_meta( $post->ID, 'StartDate', true);
    $new_format_start = date('M/j/Y',strtotime($start_date));
Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Formatting date in echo get_post_meta’ is closed to new replies.
Skip to toolbar