Browse Source

fix(nocodb): round the datetime diff result in sqlite

pull/5661/head
Wing-Kam Wong 2 years ago
parent
commit
9bf6be219c
  1. 2
      packages/nocodb/src/db/functionMappings/sqlite.ts

2
packages/nocodb/src/db/functionMappings/sqlite.ts

@ -188,7 +188,7 @@ const sqlite3 = {
default:
sql = '';
}
return { builder: knex.raw(`${sql} ${colAlias}`) };
return { builder: knex.raw(`ROUND(${sql}) ${colAlias}`) };
},
WEEKDAY: async ({ fn, knex, pt, colAlias }: MapFnArgs) => {
// strftime('%w', date) - day of week 0 - 6 with Sunday == 0

Loading…
Cancel
Save