diff --git a/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php b/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
index c919fadb67..d91ee2b183 100644
--- a/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
+++ b/core/modules/views/src/Plugin/views/query/PostgresqlDateSql.php
@@ -76,7 +76,7 @@ public function getDateField($field, $string_date) {
    */
   public function getDateFormat($field, $format) {
     $format = strtr($format, static::$replace);
-    return "TO_CHAR($field, '$format')";
+    return "TO_CHAR(TO_TIMESTAMP($field), '$format')";
   }
 
   /**
