diff --git a/packages/server/src/utilities/rowProcessor/utils.ts b/packages/server/src/utilities/rowProcessor/utils.ts index 8201680f13..0fa6f62807 100644 --- a/packages/server/src/utilities/rowProcessor/utils.ts +++ b/packages/server/src/utilities/rowProcessor/utils.ts @@ -105,6 +105,9 @@ export function processDates( if (schema.type !== FieldType.DATETIME) { continue } + if (schema.dateOnly) { + continue + } if (!schema.timeOnly && !schema.ignoreTimezones) { datesWithTZ.push(column) } diff --git a/packages/server/src/utilities/schema.ts b/packages/server/src/utilities/schema.ts index 5652391d7a..f73701fdfd 100644 --- a/packages/server/src/utilities/schema.ts +++ b/packages/server/src/utilities/schema.ts @@ -134,7 +134,11 @@ export function parse(rows: Rows, schema: TableSchema): Rows { if (columnType === FieldType.NUMBER) { // If provided must be a valid number parsedRow[columnName] = columnData ? Number(columnData) : columnData - } else if (columnType === FieldType.DATETIME && !columnSchema.timeOnly) { + } else if ( + columnType === FieldType.DATETIME && + !columnSchema.timeOnly && + !columnSchema.dateOnly + ) { // If provided must be a valid date parsedRow[columnName] = columnData ? new Date(columnData).toISOString()