Definition :
In php strtotime() Function is inbuilt function. PHP strtotime() function is used to convert a given English textual date-time description to a UNIX timestamp. It accepts a string parameter in $date which represents the English textual date-time description. It returns a timestamp on success and FALSE on failure.
strtotime(time, now);
Parameter | Description |
---|---|
time | Required. Specifies a date/time string |
now | Optional. Specifies the timestamp used as a base for the calculation of relative dates |
Given below parse English textual datetimes into Unix timestamps:
Output :
1641548179
1641584179
1641512179
1642757779
1642585001
1641686400
1641081600