Formatting date in echo get_post_meta
-
I’m using:
$has_my_meta = get_post_meta( $post->ID, 'StartDate,EndDate',true ); if( $has_my_meta ) $with_meta[] = $post->ID?>
To grab event start and end dates that are stored as custom fields, and then outputting the date with echo get_post_meta, but I’m not having a lot of luck formatting the date output. Dates are stored as YYYY-MM-DD. I’d like the dates to display as n/j/Y or even as M/j/Y. What am I missing?
Thanks in advance
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Formatting date in echo get_post_meta’ is closed to new replies.