From b643a8c3c43c71f343d60637834544f276c51d9b Mon Sep 17 00:00:00 2001 From: HB9HIL Date: Fri, 17 Nov 2023 13:32:42 +0100 Subject: [PATCH] not formatting is needed --- application/models/Logbook_model.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/application/models/Logbook_model.php b/application/models/Logbook_model.php index 2e399f4e..d39a1d2c 100755 --- a/application/models/Logbook_model.php +++ b/application/models/Logbook_model.php @@ -1840,20 +1840,15 @@ function check_if_callsign_worked_in_logbook($callsign, $StationLocationsArray = $this->db->where('COL_PROP_MODE = ' . $propagation); } - // If date is set, we format the date and add it to the where-statement + // If date is set, we add it to the where-statement if ($fromdate != "") { - $from = DateTime::createFromFormat('d/m/Y', $fromdate); - $from = $from->format('Y-m-d'); - $this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) >= '".$from."'"); + $this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) >= '".$fromdate."'"); } if ($todate != "") { - $to = DateTime::createFromFormat('d/m/Y', $todate); - $to = $to->format('Y-m-d'); - $this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) <= '".$to."'"); + $this->db->where("date(".$this->config->item('table_name').".COL_TIME_ON) <= '".$todate."'"); } $query = $this->db->get($this->config->item('table_name')); - return $query; }