I am trying to update a WordPress plugin which for some reason has chosen to store date info as varchar instead of a date related field in MySQL.
The varchar date format used is YYYY-MM-DD
When the date is outputted, it looks clunky. I’m used to using date_format in mysql to get a nicer format when outputting to the screen.
However, I can’t do that here as the date is a varchar field.
I tried to convert the date to a proper date via:
$start_day = $row ['start_day'];
$new_date = date('dS M, Y', strtotime($start_day));
But when the date is outputted on the screen, it always shows as:
01st Jan, 1970
Presumably I’m doing something silly, but I can’t see what.
Any advice much appreciated.
Thanks!