WPDev.one
Core Function
View Source on Trac ↗

mysql2date()

mysql2date( mixed $format, mixed $date, mixed $translate = true )

Converts given MySQL date string into a different format.

Parameters 2 required

Name / Type Description
$format
string

Format of the date to return.

Required
$date
string

Date string to convert.

Required
$translate
bool

Whether the return date should be translated. Default true.

Return Value

((string)
(string | int | false) Integer if `$format` is 'U' or 'G', string otherwise. False on failure.

Function Information

Since Version
0.71
Source File
wp-includes/functions.php
Advertisement