If you wanted this to be absolutely correct for ANY two dates, there are plenty of complications to consider: not least of them being leap years and worldwide time zones.
I recently had to solve a similar problem and looked into various modules out there, and concluded that DateTime was the best one to use. May be worth you taking a look.
In reply to Re: Finding the difference between 2 dates in seconds
by oxone
in thread Finding the difference between 2 dates in seconds
by qsl
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |