What is the syntax of the strptime() function in PHP?
strptime(date, format)
Parameter | Description |
---|---|
date | Required. The string to parse (e.g. returned from strftime()) |
format | Required. Specifies the format used in the date: |
Examples of the strptime() function
Example 1. In this example,
<?php
$format="%d/%m/%Y %H:%M:%S";
$strf=strftime($format);
echo("$strf");
print_r(strptime($strf,$format));
?>