Hello,
So I can display the date number, but how do I display the date day name?
I want it to read like this “Wednesday” and then separated “01 08 2014”
I been searching and trying for hours with no luck =(
this code does the trick just in case someone needs it
<?php $dates = DateTime::createFromFormat('Ymd', get_field('date_picker'));
echo $dates->format('l'); ?>
Thawnks Onyx808, works great! For those looking how to month or year, here is the list of formats – http://php.net/manual/en/datetime.createfromformat.php.
So if I input 10/24/2015 into the date picker, here’s the code to display “Saturday, October 24, 2015”.
<?php echo $dates->format('l');
echo ', ';
echo $dates->format('F');
echo ' ';
echo $dates->format('j');
echo ', ';
echo $dates->format('Y');?>
Do I need to add this code to the functions php?