in reply to Sorting dates with the Schwartzian Transform
Do I have to convert this column before the ST to a number, sort it during the ST as a number, and after the ST convert it back to the DD-MM-YYYY format?
Um no, just do a schwartzian-transform ;)
@dates = map { $_->[0] } sort { $a->[1] <=> $b->[1] } map { my $f = $_; s/\D//g; [ $f, $_ ] } @dates;
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^2: Sorting dates with the Schwartzian Transform
by GotToBTru (Prior) on Aug 03, 2011 at 17:16 UTC | |
by johngg (Canon) on Aug 03, 2011 at 22:42 UTC | |
by Anonymous Monk on Aug 04, 2011 at 11:29 UTC | |
by GotToBTru (Prior) on Aug 04, 2011 at 13:37 UTC |