Not sure if you can help with this. I'm trying to have a custom field for posts, to have the date field I'm using the ACF that comes with X, I'm trying to reference that fields as below:
$event_date = new DateTime(get_field('event_date'));
When I'm not referencing the
get_field('event_date') it just work fine to show the current date as per PHP function
DateTime(); when I do reference it I'm getting the following error.
: Uncaught Exception: DateTime::__construct(): Failed to parse time string (31/12/2018) at position 0 (3): Unexpected character in /Applications/MAMP/htdocs/cs-dev/wp-content/themes/fictional-university-theme/front-page.php:31
How can I just make it work the
get_field(); to show them on FE?
Thanks in advance!