Codular

HomeWriters RSS

PHP Date & Time 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:s11:25:08
d/m/y28/02/20Leading zero on day & month
d/m/Y28/02/2020Leading zero on day & month
j/n/y28/2/20No Leading zero on day & month
j/n/Y28/2/2020No Leading zero on day & month
jS F Y28th February 2020
j<\s\up>S F Y28th February 2020Superscripted date suffix
l dS F YFriday 28th February 2020
l j<\s\up>S F YFriday 28th February 2020
Y-m-d H:i:s2020-02-28 11:25:08MySQL DATETIME Format
Y-M-d2020-Feb-28