You might be able to use strtotime to convert $date into a Unix timestamp, which you can easily format using date().
Otherwise, you can use preg_match or substr to break up the MySQL timestamp into year, month, day, hour, minute and use mktime() to convert all of those values into a Unix timestamp.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.