Warning: date() expects parameter 2 to be long, string given in

date() expects a unix timestamp… I imagine you are passing it a date as a string.

e.g. 2010-10-10

You should use:

$this->expiry_date = date("m/d/Y", strtotime($rows['expiry_date']));

Or better yet, use the DateTime object.

$expiry_date = new DateTime($rows['expiry_date']);
$this->expiry_date = $expiry_date->format('m/d/Y');

Leave a Comment

tech