Uncaught Exception: DateTime::__construct(): Failed to parse time string
-
Hi,
I am getting an error when I add this code to get the event month. Please help me how I can resolve this issue.
Error is : Uncaught Exception: DateTime::__construct(): Failed to parse time string (23/07/2020) at position 0 (2):Code Which I am using :
<?php eventDate = new DateTime(get_field('event_date')); echo $eventDate->format('M') ?>
Viewing 4 replies - 1 through 4 (of 4 total)
Viewing 4 replies - 1 through 4 (of 4 total)
- The topic ‘Uncaught Exception: DateTime::__construct(): Failed to parse time string’ is closed to new replies.