diff --git a/packages/nocodb/src/db/BaseModelSqlv2.ts b/packages/nocodb/src/db/BaseModelSqlv2.ts index 6106639d13..61a5ade741 100644 --- a/packages/nocodb/src/db/BaseModelSqlv2.ts +++ b/packages/nocodb/src/db/BaseModelSqlv2.ts @@ -3338,9 +3338,13 @@ class BaseModelSqlv2 { d[col.title] = d[col.title].replace( /\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/g, (d: string) => { - return dayjs(d).isValid() - ? dayjs(d).utc(true).format('YYYY-MM-DD HH:mm:ssZ') - : d; + if (!dayjs(d).isValid()) return d; + if (this.isSqlite) { + // e.g. DATEADD formula + // d = 2023-04-29T04:30:00.000Z + return dayjs(d).format('YYYY-MM-DD HH:mm:ssZ'); + } + return dayjs(d).utc(true).format('YYYY-MM-DD HH:mm:ssZ'); }, ); continue;