use strict; my $d1 = '2019-06-08'; my $d2 = '2019-06-08'; my $RESULT = $d2 cmp $d1; if ($RESULT > 0) { print "\n$d1 is smaller.\n"; } elsif ($RESULT < 0) { print "\n$d1 is larger.\n"; } else { print "\nThe dates are equal!\n"; }
In reply to Re: Compare two dates
by harangzsolt33
in thread Compare two dates
by Anonymous Monk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |