Change Date

I currently have this code which shows 2023-10-29 18:42:53

echo "".$user_data['createdate']."";

how do i change it to Monday 30th October 18:42

Thanks

$date = new DateTime($user_data['createdate']);
echo $date->format('l jS F H:i');

More in depth info can be found here - https://www.php.net/manual/en/book.datetime.php

Thank you so much for the input tried a few options but this is great.

Sponsor our Newsletter | Privacy Policy | Terms of Service