<!DOCTYPE html>
<html>
    <head>
        <link href="//datatables.net/download/build/nightly/jquery.dataTables.css" rel="stylesheet" type="text/css" />
  
        <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
        <script src="//datatables.net/download/build/nightly/jquery.dataTables.js"></script>
        <meta charset=utf-8 />
        <title>DataTables - JS Bin</title>
    </head>
    <body>
        <div class="container">
            <table id="example" class="display" width="100%">
                <thead>
                    <tr>
                        <th>Name</th>
                        <th>Position</th>
                        <th>Office</th>
                        <th>Age</th>
                        <th>Start date</th>
                        <th>Salary</th>
                    </tr>
                </thead>
                <tfoot>
                    <tr>
                        <th>Name</th>
                        <th>Position</th>
                        <th>Office</th>
                        <th>Age</th>
                        <th>Start date</th>
                        <th>Salary</th>
                    </tr>
                </tfoot>
                <tbody>
                    <tr>
                        <td>Tiger Nixon</td>
                        <td>System Architect</td>
                        <td>Edinburgh</td>
                        <td>61</td>
                      <td>20/01/2014</td>
                        <td>$3,120</td>
                    </tr>
                    <tr>
                        <td>Garrett Winters</td>
                        <td>Director</td>
                        <td>Edinburgh</td>
                        <td>63</td>
                      <td>15/02/2014</td>
                        <td>$5,300</td>
                    </tr>
                    <tr>
                        <td>Ashton Cox</td>
                        <td>Technical Author</td>
                        <td>San Francisco</td>
                        <td>66</td>
                      <td>12/01/2009</td>
                        <td>$4,800</td>
                    </tr>
                    <tr>
                        <td>Cedric Kelly</td>
                        <td>Javascript Developer</td>
                        <td>Edinburgh</td>
                        <td>22</td>
                        <td>29/03/2014</td>
                        <td>$3,600</td>
                    </tr>
                    <tr>
                        <td>Jenna Elliott</td>
                        <td>Financial Controller</td>
                        <td>Edinburgh</td>
                        <td>33</td>
                      <td>28/11/2008</td>
                        <td>$5,300</td>
                    </tr>
                    <tr>
                        <td>Brielle Williamson</td>
                        <td>Integration Specialist</td>
                        <td>New York</td>
                        <td>61</td>
                      <td>02/12/2012</td>
                        <td>$4,525</td>
                    </tr>
                    <tr>
                        <td>Herrod Chandler</td>
                        <td>Sales Assistant</td>
                        <td>San Francisco</td>
                        <td>59</td>
                      <td>06/08/2012</td>
                        <td>$4,080</td>
                    </tr>
                    <tr>
                        <td>Rhona Davidson</td>
                        <td>Integration Specialist</td>
                        <td>Edinburgh</td>
                        <td>55</td>
                      <td>14/10/2010</td>
                        <td>$6,730</td>
                    </tr>
                    <tr>
                        <td>Colleen Hurst</td>
                        <td>Javascript Developer</td>
                        <td>San Francisco</td>
                        <td>39</td>
                      <td>15/09/2009</td>
                        <td>$5,000</td>
                    </tr>
                    <tr>
                        <td>Sonya Frost</td>
                        <td>Software Engineer</td>
                        <td>Edinburgh</td>
                        <td>23</td>
                      <td>13/12/2008</td>
                        <td>$3,600</td>
                    </tr>
                    <tr>
                        <td>Jena Gaines</td>
                        <td>System Architect</td>
                        <td>London</td>
                        <td>30</td>
                      <td>19/12/2008</td>
                        <td>$5,000</td>
                    </tr>
                    <tr>
                        <td>Quinn Flynn</td>
                        <td>Financial Controller</td>
                        <td>Edinburgh</td>
                        <td>22</td>
                      <td>03/03/2013</td>
                        <td>$4,200</td>
                    </tr>
                    <tr>
                        <td>Charde Marshall</td>
                        <td>Regional Director</td>
                        <td>San Francisco</td>
                        <td>36</td>
                      <td>16/10/2008</td>
                        <td>$5,300</td>
                    </tr>
                    <tr>
                        <td>Haley Kennedy</td>
                        <td>Senior Marketing Designer</td>
                        <td>London</td>
                        <td>43</td>
                      <td>18/12/2012</td>
                        <td>$4,800</td>
                    </tr>
                    
                </tbody>
            </table>
        </div>
    </body>
</html>
 
body {
    font: 90%/1.45em "Helvetica Neue", HelveticaNeue, Verdana, Arial, Helvetica, sans-serif;
    margin: 0;
    padding: 0;
    color: #333;
    background-color: #fff;
}
div.container {
    min-width: 980px;
    margin: 0 auto;
}
 
$(document).ready( function () {
     $('#example').dataTable( {
        "aoColumns": [
            null,
            null,
            null,
            null,
            { "sType": "date-uk" },
            null
          
          
        ]
    });
    
} );
jQuery.extend( jQuery.fn.dataTableExt.oSort, {
"date-uk-pre": function ( a ) {
    var ukDatea = a.split('/');
    return (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1;
},
"date-uk-asc": function ( a, b ) {
    return ((a < b) ? -1 : ((a > b) ? 1 : 0));
},
"date-uk-desc": function ( a, b ) {
    return ((a < b) ? 1 : ((a > b) ? -1 : 0));
}
} );
Output

You can jump to the latest bin by adding /latest to your URL

Dismiss x
public
Bin info
anonymouspro
0viewers