Codex

Function Reference/mysql2date

Description

Translates dates from mysql format to any format acceptable by the php date() function

Usage

mysql2date($dateformatstring, $mysqlstring, $translate = true)

$dateformatstring The requested output format. any format acceptable by the php date() function.

$mysqlstring the input string, this cannot be the raw time-stamp, it has to be converted into the following format first: 'Y-m-d H:i:s' . This is the only way mysql2date will recognize your date.

$translate (optional, default is true). Will switch format to locale.

Related

Formatting Date and Time

See also index of Function Reference and index of Template Tags.