diff --git a/core/modules/views/src/Plugin/views/query/Sql.php b/core/modules/views/src/Plugin/views/query/Sql.php
index cfe593c..9cb27b3 100644
--- a/core/modules/views/src/Plugin/views/query/Sql.php
+++ b/core/modules/views/src/Plugin/views/query/Sql.php
@@ -1863,7 +1863,7 @@ public function getDateFormat($field, $format, $string_date = FALSE) {
         );
         $format = strtr($format, $replace);
         if (!$string_date) {
-          return "TO_CHAR($field, '$format')";
+          return "TO_CHAR(TO_TIMESTAMP($field), '$format')";
         }
         // In order to allow for partials (eg, only the year), transform to a
         // date, back to a string again.
