View Full Version : A non well formed numeric value encountered

09-22-2009, 07:15 PM
When giving this:

<?php echo date('jS F Y',$row_rsTrips['date']); ?>

it outputs:

A non well formed numeric value encountered in C:\wamp\www\admin\table_output.php on line 54

1st January 1970

The field type for the date value is set to "DATE" in the mysql database, what am I missing

Thanks in advance

09-22-2009, 07:18 PM
The date() function expects a timestamp (integer) not a Date as the second parameter.

Phil Jackson
09-22-2009, 07:33 PM

echo date("jS F Y", strtotime($row_rsTrips["date"]));

echo date("jS F Y", strtotime("01/01/1970"))."<br />";
echo date("jS F Y", strtotime("1st Jan 1970"))."<br />";
echo date("jS F Y", strtotime("01 January 1970"));

All would output "1st January 1970"