mysql2date


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

Parameters:
  • (string) $format Format of the date to return.
  • (string) $date Date string to convert.
  • (bool) $translate Whether the return date should be translated. Default true.
Returns:
  • (string|int|bool) Formatted date string or Unix timestamp. False if $date is empty.
Defined at:

Description

Convert given date string into a different format.

$format should be either a PHP date format string, e.g. 'U' for a Unix timestamp, or 'G' for a Unix timestamp assuming that $date is GMT.

If $translate is true then the given date and format string will be passed to date_i18n() for translation.

Related Functions

is_date, translate, _wp_mysql_week

Top Google Results

User discussions

wpseek mobile