PHP Date & Converter

Formatting Dates

Below is a super useful reference table of common PHP dates. Enter a UNIX timestampe below to see it formatted in the table.

Enter a Unix Timestamp:


Date String Output Comment
H:i:s03:59:55
d/m/y18/08/17Leading zero on day & month
d/m/Y18/08/2017Leading zero on day & month
j/n/y18/8/17No Leading zero on day & month
j/n/Y18/8/2017No Leading zero on day & month
jS F Y18th August 2017
j<\s\up>S F Y18th August 2017Superscripted date suffix
l dS F YFriday 18th August 2017
l j<\s\up>S F YFriday 18th August 2017
Y-m-d H:i:s2017-08-18 03:59:55MySQL DATETIME Format
Y-M-d2017-Aug-18