Hi @codeview
6 days is a long time to sit on 1 issue. Even though this issue still remains, I hope that in the future you can see how any code related issue snowballs from 1 line of code:
$date = get_field('event_enddate');
I would advise you to debug your code line by line to find out at which line the data is incorrect.
Hope that helps.
Thanks
E