Opens in a new tab
A picture of Jeff Brigman
I CODE TODAY FOR
A BETTER TOMORROW

Glossary Term

mysql2date()

3 tags 1 category

mysql2date() — Converts given MySQL date string into a different format. $format should be a PHP date format string. ‘U’ and ‘G’ formats will return an integer sum of timestamp with timezone offset. $date is expected to be local time in MySQL format (Y-m-d H:i:s). Historically UTC time could be passed to the function to produce Unix timestamp. If $translate is true then the given date and format string will be passed to wp_date() for translation.

Inputs: $format (string): Format of the date to return. $date (string): Date string to convert. $translate (bool): Whether the return date should be translated. Default true.

Returns string|int|false: Integer if $format is ‘U’ or ‘G’, string otherwise. False on failure.

Term Connections

Explore related terms connected by shared tags, shared categories, and relationship phrases. This map loads only when it comes into view.

Loading term connections…