#format first date (get by localtime(time) ) my $date_1 = Time::Piece ->strptime($date, "%Y%m%d%H%M"); #format second date (get by localtime(time) ) my $date_2 = Time::Piece ->strptime($date2", "%Y%m%d%H%M"); #get the diff in seconds my $diff = $date_1 - $date_2;
In reply to Re: How to compare two dates?
by DanBev
in thread How to compare two dates?
by CountOne
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |