I am using the date field to render out the date to look like: 11/15/2014. But I want to also display the date like November 15, 2014 else where on the page. Is it somehow possible to render out the date in two different formats?

<?php the_field('date'); ?> 

2 Answers

You can use get_field and then you can change the date format to whatever you want.

$date = get_field('date'); $date2 = date("F j, Y", strtotime($date)); 
1

For 11/15/2014,

the_date('m/d/Y'); 

And for November 15, 2014,

the_date('F d, Y'); 

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy