<?xml version="1.0" encoding="windows-1252"?>
<node id="971373" title="Re: Date to be sorted in descending and time in ascending" created="2012-05-18 19:27:42" updated="2012-05-18 19:27:42">
<type id="11">
note</type>
<author id="421781">
Cristoforo</author>
<data>
<field name="doctext">
Using [doc://unpack] in a Schwartzian Transform.
&lt;p&gt;&lt;c&gt;#!/usr/bin/perl
use strict;
use warnings;
use 5.014;

print map {$_-&gt;[0]}
	 sort {$b-&gt;[1] cmp $a-&gt;[1] || $a-&gt;[2] cmp $b-&gt;[2]}
	  map {[ $_, unpack "a8a6", $_ ]} &lt;DATA&gt;;

__DATA__
20010405000000
20050405005000
20020405081200
20080405022500
20080405022600
20080405023500
20090405022500
20090405022300
20090405022900
20090405022100
&lt;/c&gt;</field>
<field name="root_node">
971240</field>
<field name="parent_node">
971240</field>
</data>
</node>
