Hi @blueturtlefl
before you use the format function on the $date variable, can you please debug it’s value like so:
<?php
echo '<pre>';
print_r( $date );
echo '</pre>';
die; ?>
Also, can you please debug the value of your date field like so:
<?php
echo '<pre>';
print_r( get_field('class_date') );
echo '</pre>';
die; ?>
It is most likely that the date value is not in the correct format to be converted into the date-time object as your code is expecting. This debugging will highlight the issue
Thanks
E