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:s06:31:37
d/m/y17/07/19Leading zero on day & month
d/m/Y17/07/2019Leading zero on day & month
j/n/y17/7/19No Leading zero on day & month
j/n/Y17/7/2019No Leading zero on day & month
jS F Y17th July 2019
j<\s\up>S F Y17th July 2019Superscripted date suffix
l dS F YWednesday 17th July 2019
l j<\s\up>S F YWednesday 17th July 2019
Y-m-d H:i:s2019-07-17 06:31:37MySQL DATETIME Format
Y-M-d2019-Jul-17