Home Tutorial Php Phpdate date_parse


Share on Google+Share on Google+
Posted on: August 26, 2009 at 12:00 AM
This is the example of array date_parse used for getting the detailed information about given date. Learn how to define date_parse() in PHP programming Language.

date_parse() in PHP

date_parse function returns associative array with detailed information about given date. It returns information about the date on success, or FALSE on failure. An error message will display if date format faces any error.

Description on Date Parse Format in PHP

array date_parse ( string $date )

Parameters of date parse class PHP

date - Date in format accepted by strtotime()

Example of Parse Date Function in PHP:


print_r(date_parse("2009-04-28 07:45:20.5"));


The above example will output:



[year] => 2009

[month] => 04

[day] => 28

[hour] => 07

[minute] => 45

[second] => 20

[fraction] => 0.5

[warning_count] => 0

[warnings] => Array()

[error_count] => 0

[errors] => Array()

[is_localtime] => 



Related Tags for date_parse:

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.

Posted on: August 26, 2009

Recommend the tutorial

Advertisements Advertisements