diff --git a/airtime_mvc/application/models/StoredFile.php b/airtime_mvc/application/models/StoredFile.php index b55848a21..557db98ff 100644 --- a/airtime_mvc/application/models/StoredFile.php +++ b/airtime_mvc/application/models/StoredFile.php @@ -588,8 +588,9 @@ class Application_Model_StoredFile { $fileSelect[] = $key; } else if ($key === "year") { + $plSelect[] = "EXTRACT(YEAR FROM utime)::varchar AS ".$key; - $fileSelect[] = $key; + $fileSelect[] = "EXTRACT(YEAR FROM to_date(year, 'YYYY-MM-DD'))::varchar AS ".$key;; } //need to cast certain data as ints for the union to search on. else if (in_array($key, array("track_number", "bit_rate", "sample_rate"))){