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:s04:35:17
d/m/y15/07/20Leading zero on day & month
d/m/Y15/07/2020Leading zero on day & month
j/n/y15/7/20No Leading zero on day & month
j/n/Y15/7/2020No Leading zero on day & month
jS F Y15th July 2020
j<\s\up>S F Y15th July 2020Superscripted date suffix
l dS F YWednesday 15th July 2020
l j<\s\up>S F YWednesday 15th July 2020
Y-m-d H:i:s2020-07-15 04:35:17MySQL DATETIME Format
Y-M-d2020-Jul-15