Answer the question
In order to leave comments, you need to log in
The year is displayed incorrectly (6699-11-27). What's wrong?
Hello. I display the dates of documents through pdoResources like this: . And I get instead of 2015-11-27 - 6699-11-27... What's wrong?
Answer the question
In order to leave comments, you need to log in
because strtotime needs to be converted to a date first
$Year = date("Y", $strtotime);
Because it's a pdoResources placeholder that doesn't translate the numeric representation of the date into a string after fetching it from the database. For this, the use of strtotime is redundant. Only the actual date placeholder and format modifier.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question