diff --git a/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts b/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts index a8e4c805c3..986004f743 100644 --- a/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts +++ b/packages/nocodb/src/db/sql-client/lib/pg/PgClient.ts @@ -3029,7 +3029,7 @@ class PGClient extends KnexClient { n.dt, castedColumn, limit, - n.meta.date_format || 'YYYY-MM-DD', + n.meta?.date_format || 'YYYY-MM-DD', ); query += this.genQuery(castQuery, [], shouldSanitize);