Convert datetimes from MySQL table to ISO8601 to create JSON feed in WordPress for use with FullCalendar

Solution:

Maybe you can try something like this.

Although I don’t know the name of your column. Uncomment the print_r to get the column name.

foreach ($myids as $key => $row) {
    // print_r($row);
    $date_reformatted = strtotime($row->date_col);
    $myids[$key]->date_col = date( 'c', $date_reformatted );
}