formatDate

function, since version 1.0.0
categories: date, converting

formatDate(format, datetime)

Converts datetime object to string representation

parameters

return type:

string

examples

formatDate('c', now())
formatDate('d.m.Y', now())
formatDate('d.m.Y', now())
formatDate('H:i:s', now())

returns

2017-01-26T03:35:55-05:00
2017-01-26
26.1.2017
03:35:55

Related functions:

Update your privacy settings