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:s08:28:50
d/m/y21/03/19Leading zero on day & month
d/m/Y21/03/2019Leading zero on day & month
j/n/y21/3/19No Leading zero on day & month
j/n/Y21/3/2019No Leading zero on day & month
jS F Y21st March 2019
j<\s\up>S F Y21st March 2019Superscripted date suffix
l dS F YThursday 21st March 2019
l j<\s\up>S F YThursday 21st March 2019
Y-m-d H:i:s2019-03-21 08:28:50MySQL DATETIME Format
Y-M-d2019-Mar-21