Date Format : ps

This commit is contained in:
sanjeev.p 2021-09-04 11:43:32 +05:30
parent 2bf0272bff
commit 4a3e8c3995
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ class SMC_Credit_PD_Model extends SPARQ_Model {
$this->db->where_in('SALES_PD_DATA.status',$pd_status);
}
if(($pd_from_date != "" || $pd_from_date != null) && ($pd_to_date != "" || $pd_to_date != null)) {
$this->db->where('SALES_PD_DATA.createdon BETWEEN '. "'$pd_from_date'". ' AND '. "'$pd_to_date'" );
$this->db->where("DATE_FORMAT(SALES_PD_DATA.createdon,'%Y-%m-%d') BETWEEN ". "'$pd_from_date'". ' AND '. "'$pd_to_date'" );
}
else if($pd_from_date != "" && $pd_from_date != null) {
$this->db->where("DATE_FORMAT(SALES_PD_DATA.createdon,'%Y-%m-%d')",$pd_from_date);