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( builder: knex.raw(
`CASE `CASE
WHEN ${(await fn(pt.arguments[0])).builder} LIKE '%:%' THEN WHEN ${(await fn(pt.arguments[0])).builder} LIKE '%:%' THEN
STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${fn( STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${
pt.arguments[0], (await fn(pt.arguments[0])).builder
)}, 'localtime'), }, 'localtime'),
${dateIN > 0 ? '+' : ''}${ ${dateIN > 0 ? '+' : ''}${
(await fn(pt.arguments[1])).builder (await fn(pt.arguments[1])).builder
} || ' ${String((await fn(pt.arguments[2])).builder).replace( } || ' ${String((await fn(pt.arguments[2])).builder).replace(

Loading…
Cancel
Save