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
I use unixtime. :)
I convert both times to unixtime and then I just have two integers to compare and so I can use the operators <, ==, > etc
e.g. convert to unixtime as follows
my $timestamp = "2014-03-25 12:33:32"; # (We assume localtime)
#
# To split on the space character, it's best to use the regex / /
#
my ($date, $time) = split (/ /, $timestamp);
my ($year, $mon, $mday) = split ('-', $date);
my ($hour, $min, $sec) = split (':', $time);
my $unixtime = timelocal($sec, $min, $hour, $mday, $mon-1, $year);