{"record":{"id":"cc484b29b387bc5f","repo":"Budibase/budibase","slug":"invalid-format-for-field-columnname-colum","errorCode":null,"errorMessage":"Invalid format for field \"${columnName}\": \"${columnData}\". Datetime fields with ignoreTimezones must be in ISO format, e.g. \"YYYY-MM-DDTHH:MM:SS\".","messagePattern":"Invalid format for field \"(.+?)\": \"(.+?)\"\\. Datetime fields with ignoreTimezones must be in ISO format, e\\.g\\. \"YYYY-MM-DDTHH:MM:SS\"\\.","errorType":"http","errorClass":"HTTPError","httpStatus":400,"severity":"error","filePath":"packages/server/src/utilities/schema.ts","lineNumber":182,"sourceCode":"      if (\n        schema[columnName].autocolumn &&\n        !table.primary?.includes(columnName)\n      ) {\n        // Don't want the user specifying values for autocolumns unless they're updating\n        // a row through its primary key.\n        return\n      }\n\n      const columnSchema = schema[columnName]\n      const { type: columnType } = columnSchema\n      if ([FieldType.NUMBER].includes(columnType)) {\n        // If provided must be a valid number\n        parsedRow[columnName] = columnData ? Number(columnData) : columnData\n      } else if (columnType === FieldType.DATETIME) {\n        if (columnData && !columnSchema.timeOnly) {\n          if (columnSchema.ignoreTimezones) {\n            if (!sql.utils.isValidISODateStringWithoutTimezone(columnData)) {\n              throw new HTTPError(\n                `Invalid format for field \"${columnName}\": \"${columnData}\". Datetime fields with ignoreTimezones must be in ISO format, e.g. \"YYYY-MM-DDTHH:MM:SS\".`,\n                400\n              )\n            }\n            parsedRow[columnName] = new Date(columnData.trim() + \"Z\")\n          } else {\n            if (!sql.utils.isValidISODateString(columnData)) {\n              let message = `Invalid format for field \"${columnName}\": \"${columnData}\".`\n              if (columnSchema.dateOnly) {\n                message += ` Date-only fields must be in the format \"YYYY-MM-DD\".`\n              } else {\n                message += ` Datetime fields must be in ISO format, e.g. \"YYYY-MM-DDTHH:MM:SSZ\".`\n              }\n              throw new HTTPError(message, 400)\n            }\n          }\n        }\n        if (columnData && columnSchema.timeOnly) {","sourceCodeStart":164,"sourceCodeEnd":200,"githubUrl":"https://github.com/Budibase/budibase/blob/a81a902e9a8fe55b467d106765f6638f12e35c49/packages/server/src/utilities/schema.ts#L164-L200","documentation":"This HTTP 400 error is thrown by the row-parsing logic in packages/server/src/utilities/schema.ts when a value supplied for a DATETIME column that has `ignoreTimezones: true` in its schema does not match the ISO format without a timezone suffix (checked by isValidISODateStringWithoutTimezone, e.g. \"YYYY-MM-DDTHH:MM:SS\"). Because ignoreTimezones columns are stored as UTC with a \"Z\" appended internally, any offset like \"+02:00\" or a trailing \"Z\" in the input would corrupt the stored value, so it is rejected up front.","triggerScenarios":"Uploading/creating rows where a datetime column marked ignoreTimezones receives a value with a timezone suffix: \"2024-01-05T10:00:00Z\", \"2024-01-05T10:00:00+02:00\", a locale string like \"05/01/2024 10am\", or a plain date \"2024-01-05\" that fails the regex.","commonSituations":"Importing CSV exports from systems that always append Z or offsets; clients sending new Date().toISOString() output (which ends in Z); switching a column to ignoreTimezones after data was written with offsets; API integrations posting JavaScript date strings.","solutions":["Strip the timezone portion before sending: send \"YYYY-MM-DDTHH:MM:SS\" with no Z or offset, after converting to UTC yourself.","If offsets are meaningful, disable ignoreTimezones on the column so timezone-suffixed values are accepted.","Pre-validate the string with the same regex/isValidISODateStringWithoutTimezone check before calling the API.","For imports, transform date columns in the source file to the timezone-less ISO format."],"exampleFix":"// before\nrow[\"due\"] = new Date().toISOString() // \"2024-01-05T10:00:00.000Z\"\n// after\nconst d = new Date()\nconst pad = (n: number) => String(n).padStart(2, \"0\")\nrow[\"due\"] = `${d.getUTCFullYear()}-${pad(d.getUTCMonth() + 1)}-${pad(d.getUTCDate())}T${pad(d.getUTCHours())}:${pad(d.getUTCMinutes())}:${pad(d.getUTCSeconds())}` // \"2024-01-05T10:00:00\"","handlingStrategy":"validation","validationCode":"const ISO_NO_TZ = /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$/\nfunction validNoTzIso(v: string) {\n  return ISO_NO_TZ.test(v.trim()) && !isNaN(new Date(v.trim()).getTime())\n}\nif (!validNoTzIso(row.due)) row.due = toUtcNoTzIso(row.due)","typeGuard":"function isIsoNoTz(v: unknown): v is string {\n  return typeof v === \"string\" &&\n    /^\\d{4}-\\d{2}-\\d{2}T\\d{2}:\\d{2}:\\d{2}$/.test(v.trim()) &&\n    !isNaN(new Date(v.trim()).getTime())\n}","tryCatchPattern":"try {\n  await saveRow(row)\n} catch (e) {\n  if (e instanceof HTTPError && e.status === 400 && /ignoreTimezones/.test(e.message)) {\n    row.due = toUtcNoTzIso(row.due)\n    await saveRow(row)\n  } else throw e\n}","preventionTips":["Convert to UTC and strip the Z/offset before sending to ignoreTimezones columns","Never feed new Date().toISOString() directly into ignoreTimezones fields","When toggling a column to ignoreTimezones, reformat existing client payloads first","Pre-validate dates in import pipelines with the same ISO regex"],"tags":["validation","datetime","bad-request","schema"],"backgroundTag":"invalid-datetime-format","analyzedSha":"a81a902e9a8fe55b467d106765f6638f12e35c49","analyzedAt":"2026-08-29T01:03:10.972Z","schemaVersion":2},"datasetVersion":"2026-08-29T02:17:18.158Z"}