Share on Google+Share on Google+

PHP date_create_from_format function

Advertisement
In this PHP date examples series we will show you how to use the PHP date_create_from_format function with example.

date_create_from_format  function

The date_create_from_format function is also known as DateTime::createFromFormat. This function returns 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.

 

Advertisements

Posted on: August 25, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Share this Tutorial Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.