Browse Source

fix(nocodb): DATEADD formula in sqlite

pull/5638/head
Wing-Kam Wong 2 years ago
parent
commit
229c463c58
  1. 6
      packages/nocodb/src/db/functionMappings/sqlite.ts

6
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(

Loading…
Cancel
Save