Support

Account

Home Forums Bug Reports Date Picker – date appears as 1st Jan 1970??? Reply To: Date Picker – date appears as 1st Jan 1970???

  • 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?