Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

datetime calculation in shell

$ date --date 'March 1, 2015 +7 days'
Sun Mar  8 00:00:00 MST 2015
$ date --date 'March 1, 2015 -1 year'
Sat Mar  1 00:00:00 MST 2014
$ date --date 'March 1, 2015 +12 days +12 hours +15 minutes'
Fri Mar 13 12:15:00 MST 2015
Source by www.linuxjournal.com #
 
PREVIOUS NEXT
Tagged: #datetime #calculation #shell
ADD COMMENT
Topic
Name
5+4 =