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:s01:07:10
d/m/y26/09/17Leading zero on day & month
d/m/Y26/09/2017Leading zero on day & month
j/n/y26/9/17No Leading zero on day & month
j/n/Y26/9/2017No Leading zero on day & month
jS F Y26th September 2017
j<\s\up>S F Y26th September 2017Superscripted date suffix
l dS F YTuesday 26th September 2017
l j<\s\up>S F YTuesday 26th September 2017
Y-m-d H:i:s2017-09-26 01:07:10MySQL DATETIME Format
Y-M-d2017-Sep-26