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:06:20
d/m/y16/11/18Leading zero on day & month
d/m/Y16/11/2018Leading zero on day & month
j/n/y16/11/18No Leading zero on day & month
j/n/Y16/11/2018No Leading zero on day & month
jS F Y16th November 2018
j<\s\up>S F Y16th November 2018Superscripted date suffix
l dS F YFriday 16th November 2018
l j<\s\up>S F YFriday 16th November 2018
Y-m-d H:i:s2018-11-16 21:06:20MySQL DATETIME Format
Y-M-d2018-Nov-16