Share on Google+Share on Google+

date_parse

Advertisement
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:

<?php


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


?>



The above example will output:



Array


(


[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] => 


)

Advertisements

Posted on: August 26, 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.