Definition
The date_parse_from_format() function returns an associative array with detailed info about given date formatted according to the specified format.
Syntax
date_parse_from_format(format, date)
Parameters
Parameter | Description |
---|---|
format |
Required. Specifies the format (a format accepted by date_create_from_format() ). |
date |
Required. A string that specifies a date. |
Example
<?php
print_r(date_parse_from_format("mmddyyyy", "12252021"));