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:s07:54:38
d/m/y17/10/19Leading zero on day & month
d/m/Y17/10/2019Leading zero on day & month
j/n/y17/10/19No Leading zero on day & month
j/n/Y17/10/2019No Leading zero on day & month
jS F Y17th October 2019
j<\s\up>S F Y17th October 2019Superscripted date suffix
l dS F YThursday 17th October 2019
l j<\s\up>S F YThursday 17th October 2019
Y-m-d H:i:s2019-10-17 07:54:38MySQL DATETIME Format
Y-M-d2019-Oct-17