How can I change this to sort by time too?
<p>I want to sort by</p>

<p>Month Day Year Hour Minute PM/AM (MM/dd/yyyy h mm tt)</p>

<p>I want to change this what does dd/mm/yy</p>

<p>However I am not sure how to do this</p>

<pre><code>jQuery.fn.dataTableExt.oSort['uk_date-asc']  = function(a,b) {
    var ukDatea = a.split('/');
    var ukDateb = b.split('/');

    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
    var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1;

    return ((x &lt; y) ? -1 : ((x &gt; y) ?  1 : 0));
};

jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) {
    var ukDatea = a.split('/');
    var ukDateb = b.split('/');

    var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
    var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1;

    return ((x &lt; y) ? 1 : ((x &gt; y) ?  -1 : 0));
};
</code></pre>

<p><a href="http://datatables.net/plug-ins/sorting" rel="nofollow">http://datatables.net/plug-ins/sorting</a></p>

<p><strong>Edit</strong></p>

<p>So I got it sorting ascending but I don't know how to write it for descending. </p>

<pre><code>jQuery.fn.dataTableExt.oSort['datetime-asc'] = function (a, b)
{
    var firstDate = new Date(a);
    var secondDate = new Date(b);

    if (firstDate == secondDate)
    {
        return 0;
    }
    else if (firstDate &gt; secondDate)
    {
        return 1;
    }
    else
    {
        return -1;
    }
};

jQuery.fn.dataTableExt.oSort['datetime-desc'] = function (a, b)
{
    var firstDate = new Date(a);
    var secondDate = new Date(b);

    if (secondDate == firstDate)
    {
        return 0;
    }
    else if (secondDate &gt; firstDate)
    {
        return 1;
    }
    else
    {
        return -1;
    }
};
</code></pre>
