Home > PHP > Function > Date/Time > strptime()

strptime()

strptime - Parse a time/date generated with

strftime()

Syntax

array strptime (string $date, string $format)

Arguments

  • date - The string to parse (e.g. returned from strftime())
  • format - The format used in date (e.g. the same as used in strftime()). For more information about the format options, read the strftime() page.

Description

strptime() returns an array with the date parsed, or FALSE on error.

Version

PHP 5.1.0

Return value

Returns an array or FALSE on failure.