Latest web development tutorials

PHP date_parse_from_format () function

PHP Date / Time PHP Date / Time Reference Manual

Examples

According to the specified format returns an associative array that contains the specified date information:

<?php
print_r(date_parse_from_format("mmddyyyy","05122013"));
?>

Running instance »

Definition and Usage

date_parse_from_format () function according to the specified format returns an associative array containing information specified date.

grammar

date_parse_from_format( format,date);

参数 描述
format 必需。规定格式(格式由 date_create_from_format() 接受)。
date 必需。一个指定日期的字符串。

technical details

return value: If successful, it returns an associative array that contains the specified date information.
PHP version: 5.3+


PHP Date / Time PHP Date / Time Reference Manual