Hi Abu Ghufran,
I want to have date format as dd-mm-yyyy and for this I am using this code
$g->select_command = "SELECT *, date_format(date, '%d-%m-%Y') date_of_entry FROM credit_sales WHERE sale_date BETWEEN '".$_SESSION['formatted_from_date']."' AND '".$_SESSION['formatted_to_date']."'";
$col["title"] = "Date of Entry";
$col["name"] = "date_of_entry";
$col["width"] = "100";
$col["editable"] = false;
$cols[] = $col;
This makes the format work but sorting of this column does not work any more.
Thanks and Best Regards,
Aamir
Debug using firebug to get actual error.
I tested it on dev, and using alias, sorting works fine.
For searching, you need to set
$col["dbname"] = "date_format(date, '%d-%m-%Y')"; // actual field name, non-alias as it will be used in WHERE clause