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:s09:35:25
d/m/y24/01/19Leading zero on day & month
d/m/Y24/01/2019Leading zero on day & month
j/n/y24/1/19No Leading zero on day & month
j/n/Y24/1/2019No Leading zero on day & month
jS F Y24th January 2019
j<\s\up>S F Y24th January 2019Superscripted date suffix
l dS F YThursday 24th January 2019
l j<\s\up>S F YThursday 24th January 2019
Y-m-d H:i:s2019-01-24 09:35:25MySQL DATETIME Format
Y-M-d2019-Jan-24