FIX_DATE_NULL_ISSUE

This commit is contained in:
velz 2025-12-15 15:44:56 +05:30
parent b597882714
commit c1cef8a80e

View File

@ -95,9 +95,15 @@ class EnquiryController extends ResourceController
foreach ($data as $key => $row) { foreach ($data as $key => $row) {
if($row['created_on'] !== null)
{
$data[$key]['created_on'] = date('d-m-Y h:i A', strtotime($row['created_on'])); $data[$key]['created_on'] = date('d-m-Y h:i A', strtotime($row['created_on']));
}
if($row['updated_on'] !== null)
{
$data[$key]['updated_on'] = date('d-m-Y h:i A', strtotime($row['updated_on'])); $data[$key]['updated_on'] = date('d-m-Y h:i A', strtotime($row['updated_on']));
} }
}
if (!empty($from_date) || empty(!$to_date)) { if (!empty($from_date) || empty(!$to_date)) {
$from_date = DateTime::createFromFormat('Y-m-d 00:00:00', $from_date)->format('d-m-Y'); $from_date = DateTime::createFromFormat('Y-m-d 00:00:00', $from_date)->format('d-m-Y');