DateTime
PHP Manual

DateTime::createFromFormat

(PHP 5 >= 5.3.0)

DateTime::createFromFormatReturns new DateTime object formatted according to the specified format

Description

public static DateTime DateTime::createFromFormat ( string $format , string $time [, DateTimeZone $timezone ] )

Returns new DateTime object formatted according to the specified format.

Parameters

format

Format accepted by date().

time

String representing the time.

timezone

Time zone.

Return Values

Returns new DateTime instance.


DateTime
PHP Manual