Home

Crush Tools convdate

Published on 7/27/2016


Convert dates on the command line

$ echo '7-25-2015-12:12:12' | convdate --verbose
2016-07-25-12:12:12
$ echo '7/25/16' | convdate --verbose -i '%m/%d/%y' -o '%Y-%m-%d'
2016-07-25

where
i is the input format, as perĀ http://pubs.opengroup.org/onlinepubs/009695399/functions/strptime.html
o is the output format, as perĀ http://pubs.opengroup.org/onlinepubs/009695399/functions/strftime.html

... views