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:s17:03:59
d/m/y17/10/18Leading zero on day & month
d/m/Y17/10/2018Leading zero on day & month
j/n/y17/10/18No Leading zero on day & month
j/n/Y17/10/2018No Leading zero on day & month
jS F Y17th October 2018
j<\s\up>S F Y17th October 2018Superscripted date suffix
l dS F YWednesday 17th October 2018
l j<\s\up>S F YWednesday 17th October 2018
Y-m-d H:i:s2018-10-17 17:03:59MySQL DATETIME Format
Y-M-d2018-Oct-17