Share on Google+Share on Google+

PHP date_create

In this example we will see the use of PHP date_create function. The PHP date_create method returns date and time object.

date_create ()

date_create function returns new DateTime object. It returns DateTime object on success or returns FALSE on failure. This functions was introduced in PHP 5.1.0.


DateTime date_create ([ string $time= "now" [, DateTimeZone $timezone= NULL ]] )


time - String in a format accepted by strtotime(), defaults to "now".

timezone - Time zone of the time.



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.