Subtract two date difference in days
olddate=2018-06-19
newdate=2020-04-24
echo $(( ($(date -d $newdate +%s) - $(date -d $olddate +%s)) / 86400 )) days
olddate=2018-06-19
newdate=2020-04-24
echo $(( ($(date -d $newdate +%s) - $(date -d $olddate +%s)) / 86400 )) days
0 comments:
Post a Comment