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:s02:43:28
d/m/y22/08/19Leading zero on day & month
d/m/Y22/08/2019Leading zero on day & month
j/n/y22/8/19No Leading zero on day & month
j/n/Y22/8/2019No Leading zero on day & month
jS F Y22nd August 2019
j<\s\up>S F Y22nd August 2019Superscripted date suffix
l dS F YThursday 22nd August 2019
l j<\s\up>S F YThursday 22nd August 2019
Y-m-d H:i:s2019-08-22 02:43:28MySQL DATETIME Format
Y-M-d2019-Aug-22