Hi,
I’ve been trying to get this to work, but the variable $date
just returns boolean false:
$date = DateTime::createFromFormat('Ymd', get_field('date'));
I upgraded to PHP 5.5.3 with my MAMP installation as I thought that might be the problem, but it seems not.
Is there any way I can troubleshoot this or is there an alternative for formatting the date returned? Currently I’m using the code as in the date picket example page i.e. $date->format('d/m/Y');
Thanks,
Osu
Damn, it’s been a long day. Just realised I needed to use get_sub_field
not get_field
as I’m using a repeater field. *smacks forehead*