PHP date standard format

person shubham sharmafolder_openissues, PHPlocal_offer, , access_time December 7, 2016

 

The strtotime() function parses an English textual datetime into a Unix timestamp (the number of seconds since January 1 1970 00:00:00 GMT).

Note: If the year is specified in a two-digit format, values between 0-69 are mapped to 2000-2069 and values between 70-100 are mapped to 1970-2000.

Note: Be aware of dates in the m/d/y or d-m-y formats; if the separator is a slash (/), then the American m/d/y is assumed. If the separator is a dash (-) or a dot (.), then the European d-m-y format is assumed. To avoid potential errors, you should YYYY-MM-DD dates or date_create_from_format() when possible.

 

DatesĀ format
YYYY-MM-DD HH:MM:SS
YYYY/MM/DD HH:MM:SS
MM/DD/YYYY HH:MM:SS
MM/DD/YYYY HH:MM:SS
DD-MM-YYYY HH:MM:SS

warningComments are closed.