1

I have a requirement to calculate hours between two time stamp,

Example: Date1 : 2016-02-24 08:30:10 Date2 : 2016-02-26 11:25:10

The script should consider the date and time as well while calculating hours.

please provide the information....

  • The tone of this question seems a little bit demanding. That's probably not your intention. Consider rewording the last sentence. – Steve Jorgensen Feb 28 '16 at 08:06
  • Have a look at this link. Which scripting language you are using? http://stackoverflow.com/questions/8903239/how-to-calculate-time-difference-in-bash-script/24996647#24996647 – Krishnadas PC Feb 28 '16 at 08:09
  • If you have GNU date, use `date -d "$date" '+%s`, and do a little arithmetic. – glenn jackman Feb 28 '16 at 13:06

0 Answers0