Custom Sort for Datatable

Custom Sort for Datatable

i wan to make custom sort - descending by first column

< table class = "table table-striped table-bordered data display nowrap" style = " width:100%" id = "data" >
< thead >
< tr >
< th > ID </ th >
< th > Date </ th >
< th > Customer </ th >
< th > Total </ th >
< th > Notes </ th >
< th > Created By </ th >
< th > Action </ th >
</ tr >
</ thead >
< tbody >
<?php foreach ( $so as $s ) { ? >
< tr >
< td > <?php echo $s -> Doid ? > </ td >
< td > <?php echo date_format ( new DateTime ( $s -> Tgl ), "d M Y" ) ? > </ td >
< td > <?php echo $s -> name ? > </ td >
< td class = "text-right" > <?php echo number_format ( $s -> total ) ? > </ td >
< td style = " word-wrap: break-word;min-width: 160px;max-width: 300px;white-space:normal;" > <?php echo $s -> Catatan ? > </ td >
< td > <?php echo $s -> staffname ? > </ td >
< td >
< a href = " <?php echo base_url () . 'salesorder/edit/' . $s -> Doid ; ? > " >< button class = "btn btn-primary" > Edit </ button ></ a >
< a href = " <?php echo base_url () . 'salerorder/delete/' . $s -> Doid ; ? > " >< button class = "btn btn-danger" > Delete </ button ></ a >
</ td >

</ tr >
<?php } ? >
</ tbody >
</ table >


< script type = "text/javascript" >
jQuery ( document ). ready ( function ( $ ){
$ ( '.data' ). DataTable (
{
"pageLength" : 10 ,
"scrollX" : true
fields : [ { name: 'ID' , sortDir: 'DESC' } ]
}
);
});
< / script >