If you want to take the date from MySQL and display it a certain way with the DATE function in PHP you first need to convert it. Use the following code:
date(formatstring, strtotime($rowentry));
formatstring is your format string for your date (see date reference)
strtotime is a function in PHP that takes a string
$rowentry is the DATETIME data from your MySQL database
No comments:
Post a Comment