Example output formats of the linux date command

For quick reference, here are some common date formats that the linux date command can output.

Seconds since 1970:

$ date +%s

SQL datetime format:

$ date "+%F %T"
2011-09-29 00:17:07

ISO 8601 standard:

$ date "+%Y%m%dT%H%M%SZ"

For all other supported formats, please see the date command's man page.

Last updated: 29/09/2011