I have this date time format in string “11:56:41, 11/22/2011”.
Here’s what I want:
Compare two date time strings like.
$date1 = "11:56:41, 11/22/2011";
$date2 = "11:20:41, 11/20/2011";
if($date2 < $date1) {
do something...
} else {
do nothing...
}
Any ideas how could i achieve this in perl?
An efficient method is to reorder the fields to something lexically comparable.