Operating System - HP-UX
1836575 Members
1694 Online
110102 Solutions
New Discussion

function to subtract dates

 
Parveen_3
Occasional Contributor

function to subtract dates

Hi,

Is there any simple function to subtract two dates in shell scripting.
The date format is : yymmdd, for ex:050803

The function should take care of dates of any year.

Thanks in advance.
2 REPLIES 2
Muthukumar_5
Honored Contributor

Re: function to subtract dates

Check this,
http://www.kingcomputerservices.com/unix_101/subtracting_dates.htm
hth.
Easy to suggest when don't know about the problem!
Muthukumar_5
Honored Contributor

Re: function to subtract dates