this portion of code is outputing 01/01/1970. is my code incorrect? i have only posted the relevant part because it is part of a json page. the table field is date format. thanks
date('d/m/Y',$row['destroy_date'])
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If
$row['destroy_date']is not a UNIX timestamp, parse it with strtotime first:Read in the manual for date and you’ll see that the second argument cannot be a date in any format.