diff --git a/packages/nocodb/package-lock.json b/packages/nocodb/package-lock.json index c1c56a1da6..650657cb03 100644 --- a/packages/nocodb/package-lock.json +++ b/packages/nocodb/package-lock.json @@ -17639,9 +17639,9 @@ "integrity": "sha512-3lqz5YjWTYnW6dlDa5TLaTCcShfar1e40rmcJVwCBJC6mWlFuj0eCHIElmG1g5kyuJ/GD+8Wn4FFCcz4gJPfaQ==" }, "node_modules/vm2": { - "version": "3.9.17", - "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.17.tgz", - "integrity": "sha512-AqwtCnZ/ERcX+AVj9vUsphY56YANXxRuqMb7GsDtAr0m0PcQX3u0Aj3KWiXM0YAHy7i6JEeHrwOnwXbGYgRpAw==", + "version": "3.9.18", + "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.18.tgz", + "integrity": "sha512-iM7PchOElv6Uv6Q+0Hq7dcgDtWWT6SizYqVcvol+1WQc+E9HlgTCnPozbQNSP3yDV9oXHQOEQu530w2q/BCVZg==", "dependencies": { "acorn": "^8.7.0", "acorn-walk": "^8.2.0" @@ -31838,9 +31838,9 @@ } }, "vm2": { - "version": "3.9.17", - "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.17.tgz", - "integrity": "sha512-AqwtCnZ/ERcX+AVj9vUsphY56YANXxRuqMb7GsDtAr0m0PcQX3u0Aj3KWiXM0YAHy7i6JEeHrwOnwXbGYgRpAw==", + "version": "3.9.18", + "resolved": "https://registry.npmjs.org/vm2/-/vm2-3.9.18.tgz", + "integrity": "sha512-iM7PchOElv6Uv6Q+0Hq7dcgDtWWT6SizYqVcvol+1WQc+E9HlgTCnPozbQNSP3yDV9oXHQOEQu530w2q/BCVZg==", "requires": { "acorn": "^8.7.0", "acorn-walk": "^8.2.0" diff --git a/packages/nocodb/src/db/functionMappings/sqlite.ts b/packages/nocodb/src/db/functionMappings/sqlite.ts index da4ab19a45..c5e103563f 100644 --- a/packages/nocodb/src/db/functionMappings/sqlite.ts +++ b/packages/nocodb/src/db/functionMappings/sqlite.ts @@ -95,9 +95,9 @@ const sqlite3 = { builder: knex.raw( `CASE WHEN ${(await fn(pt.arguments[0])).builder} LIKE '%:%' THEN - STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${fn( - pt.arguments[0], - )}, 'localtime'), + STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${ + (await fn(pt.arguments[0])).builder + }, 'localtime'), ${dateIN > 0 ? '+' : ''}${ (await fn(pt.arguments[1])).builder } || ' ${String((await fn(pt.arguments[2])).builder).replace(