diff --git a/packages/nocodb/src/db/functionMappings/mysql.ts b/packages/nocodb/src/db/functionMappings/mysql.ts index ebae277f5d..eee9253663 100644 --- a/packages/nocodb/src/db/functionMappings/mysql.ts +++ b/packages/nocodb/src/db/functionMappings/mysql.ts @@ -62,7 +62,7 @@ const mysql2 = { DATE_FORMAT(DATE_ADD(${(await fn(pt.arguments[0])).builder}, INTERVAL ${(await fn(pt.arguments[1])).builder} ${String( (await fn(pt.arguments[2])).builder, - ).replace(/["']/g, '')}), '%Y-%m-%d %H:%i') + ).replace(/["']/g, '')}), '%Y-%m-%d %H:%i:%s') ELSE DATE(DATE_ADD(${(await fn(pt.arguments[0])).builder}, INTERVAL ${(await fn(pt.arguments[1])).builder} ${String( diff --git a/packages/nocodb/src/db/functionMappings/sqlite.ts b/packages/nocodb/src/db/functionMappings/sqlite.ts index 7f0fafda9d..15d6de4a19 100644 --- a/packages/nocodb/src/db/functionMappings/sqlite.ts +++ b/packages/nocodb/src/db/functionMappings/sqlite.ts @@ -95,7 +95,7 @@ const sqlite3 = { builder: knex.raw( `CASE WHEN ${(await fn(pt.arguments[0])).builder} LIKE '%:%' THEN - STRFTIME('%Y-%m-%d %H:%M', DATETIME(DATETIME(${ + STRFTIME('%Y-%m-%d %H:%M:%S', DATETIME(DATETIME(${ (await fn(pt.arguments[0])).builder }, 'localtime'), ${dateIN > 0 ? '+' : ''}${