{string} Formatted string or the input if input is not recognized as date/millis.
Formats date
to a string based on the requested format
.
format
string can be composed of the following elements:
'yyyy'
: 4 digit representation of year e.g. 2010'yy'
: 2 digit representation of year, padded (00-99)'MM'
: Month in year, padded (01‒12)'M'
: Month in year (1‒12)'dd'
: Day in month, padded (01‒31)'d'
: Day in month (1-31)'HH'
: Hour in day, padded (00‒23)'H'
: Hour in day (0-23)'hh'
: Hour in am/pm, padded (01‒12)'h'
: Hour in am/pm, (1-12)'mm'
: Minute in hour, padded (00‒59)'m'
: Minute in hour (0-59)'ss'
: Second in minute, padded (00‒59)'s'
: Second in minute (0‒59)'a'
: am/pm marker'Z'
: 4 digit (+sign) representation of the timezone offset (-1200‒1200)