If I use a query to pull a date from MySQL and then try to format it using PHP, it always displays 1st Jan 1970 (presumably this is day 1 for php?).
Here's what I've got - assuming that $myvar contains a date pulled from MySQL:
echo "Date: ".date('jS F Y', $myvar);
If I replace $myvar with an integer, it displays the appropriate date, so why won't it work with the variable?
Here's what I've got - assuming that $myvar contains a date pulled from MySQL:
echo "Date: ".date('jS F Y', $myvar);
If I replace $myvar with an integer, it displays the appropriate date, so why won't it work with the variable?