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:s21:54:20
d/m/y24/03/17Leading zero on day & month
d/m/Y24/03/2017Leading zero on day & month
j/n/y24/3/17No Leading zero on day & month
j/n/Y24/3/2017No Leading zero on day & month
jS F Y24th March 2017
j<\s\up>S F Y24th March 2017Superscripted date suffix
l dS F YFriday 24th March 2017
l j<\s\up>S F YFriday 24th March 2017
Y-m-d H:i:s2017-03-24 21:54:20MySQL DATETIME Format
Y-M-d2017-Mar-24