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:s13:16:29
d/m/y25/04/17Leading zero on day & month
d/m/Y25/04/2017Leading zero on day & month
j/n/y25/4/17No Leading zero on day & month
j/n/Y25/4/2017No Leading zero on day & month
jS F Y25th April 2017
j<\s\up>S F Y25th April 2017Superscripted date suffix
l dS F YTuesday 25th April 2017
l j<\s\up>S F YTuesday 25th April 2017
Y-m-d H:i:s2017-04-25 13:16:29MySQL DATETIME Format
Y-M-d2017-Apr-25