Home Tutorial Php Phpdate date_parse

 
 

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

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


)

Related Tags for date_parse:


Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.