date subtraction(URGENT)

Hi all,

I need the date subtraction fuctionality using shell commands.
For example:
date1:Wed Apr 5 08:35:21 IST 2006
date2:Tue Apr 4 10:35:44 IST 2006
I need the date subtraction result like " 22 hours 23 seconds".

Please guide me to complete this task.
Can you please help me ASAP.

Regards,
Uday

same is my question...
experts pls help us..

Two different users posting similar questions. Looks like homework.

Hi vino,

Posts are similar but the first one was in the year "2006".:smiley:

This is not a home work.

I am writing a unix program which will generate a report of a process.The process is having two logs the start.log(time of start of process )and the end.log(end time of the process).

I want in my report to show the over all time of the process for that i will have to subtract the end time from start time.
I know to fetch the data from the logs.
Now i want to subtract the two dates.
The datecalc is also not working as this invloves characters.
Request expert help.