I’m having the same issue when using the date field in a repeater (the repeater is the subfield of a group).
When I use the code
$date = get_sub_field('date'); and echo the variable, the string returned matches the data entry in the database (each date is different). When I convert the date using methods above such as
<?php echo date("F j, Y", strtotime($date)); ?>, the strtotime is not working and
Jan 1, 1970 is always returned.
In contrast, when I use the DateTime method mentioned above, only the current day’s date is returned.
Is this a bug, should DateTime be avoided in repeaters?
Welcome to the Advanced Custom Fields community forum.
Browse through ideas, snippets of code, questions and answers between fellow ACF users
Helping others is a great way to earn karma, gain badges and help ACF development!