{"record":{"id":"eaa9724030104be8","repo":"apache/seatunnel","slug":"common-33-eaa972","errorCode":"COMMON-33","errorMessage":"The datetime format '<datetime>' of field '<field>' is not supported. Please check the datetime format.","messagePattern":"The datetime format '<datetime>' of field '<field>' is not supported\\. Please check the datetime format\\.","errorType":"error_code","errorClass":"SeaTunnelRuntimeException","httpStatus":null,"severity":"error","filePath":"seatunnel-formats/seatunnel-format-text/src/main/java/org/apache/seatunnel/format/text/TextDeserializationSchema.java","lineNumber":331,"sourceCode":"                    dateFormatter = DateUtils.matchDateFormatter(field);\n                    fieldFormatterMap.put(fieldName, dateFormatter);\n                }\n                if (dateFormatter == null) {\n                    throw CommonError.formatDateError(field, fieldName);\n                }\n\n                return dateFormatter.parse(field).query(TemporalQueries.localDate());\n            case TIME:\n                TemporalAccessor parsedTime = TIME_FORMAT.parse(field);\n                return parsedTime.query(TemporalQueries.localTime());\n            case TIMESTAMP:\n                DateTimeFormatter dateTimeFormatter = fieldFormatterMap.get(fieldName);\n                if (dateTimeFormatter == null) {\n                    dateTimeFormatter = DateTimeUtils.matchDateTimeFormatter(field);\n                    fieldFormatterMap.put(fieldName, dateTimeFormatter);\n                }\n                if (dateTimeFormatter == null) {\n                    throw CommonError.formatDateTimeError(field, fieldName);\n                }\n\n                TemporalAccessor parsedTimestamp = dateTimeFormatter.parse(field);\n                LocalTime localTime = parsedTimestamp.query(TemporalQueries.localTime());\n                LocalDate localDate = parsedTimestamp.query(TemporalQueries.localDate());\n                return LocalDateTime.of(localDate, localTime);\n            case TIMESTAMP_TZ:\n                try {\n                    return OffsetDateTime.parse(field, DateTimeFormatter.ISO_OFFSET_DATE_TIME);\n                } catch (DateTimeParseException ignored) {\n                    // Fallback: data written by old SeaTunnel (wall-clock, no offset).\n                    // Parse as LocalDateTime and attach UTC — offset info is already lost.\n                    DateTimeFormatter fallbackFmt = DateTimeUtils.matchDateTimeFormatter(field);\n                    if (fallbackFmt == null) {\n                        throw CommonError.formatDateTimeError(field, fieldName);\n                    }\n                    TemporalAccessor ta = fallbackFmt.parse(field);\n                    return LocalDateTime.of(","sourceCodeStart":313,"sourceCodeEnd":349,"githubUrl":"https://github.com/apache/seatunnel/blob/cf67b549a7a6c35fa0beb12d83c62892427ea919/seatunnel-formats/seatunnel-format-text/src/main/java/org/apache/seatunnel/format/text/TextDeserializationSchema.java#L313-L349","documentation":"TextDeserializationSchema.convert() throws this when a field mapped to SeaTunnel TIMESTAMP type cannot be matched to any datetime pattern by DateTimeUtils.matchDateTimeFormatter(field). CommonError.formatDateTimeError indicates the raw string is not a recognized datetime format.","triggerScenarios":"Deserializing a text column mapped to TIMESTAMP where the string lacks a time part (e.g. '2024-05-06') or uses an unsupported pattern ('2024-05-06 12:00PM', epoch millis as string, ISO with 'Z' not in the matcher's list).","commonSituations":"CSV where datetime was exported as date-only; fractional seconds or timezone suffixes not covered by the matcher; epoch timestamps stored as text; locale-formatted datetimes from Excel exports.","solutions":["Compare the value in the error message to the supported patterns in DateTimeUtils.matchDateTimeFormatter and normalize the data (e.g. 'yyyy-MM-dd HH:mm:ss').","Change the column type to STRING and parse manually downstream.","Fix the export process to emit the canonical supported datetime format.","Strip timezone suffixes/fractional seconds not supported by the matcher before ingestion.","Extend DateTimeUtils with the needed pattern if the format is a project requirement."],"exampleFix":"// before (data)\n2024-05-06\n// after\n2024-05-06 00:00:00","handlingStrategy":"validation","validationCode":"boolean isSupportedDateTime(String v) {\n    return v != null && v.matches(\"\\\\d{4}-\\\\d{2}-\\\\d{2}[ T]\\\\d{2}:\\\\d{2}:\\\\d{2}(.\\\\d+)?\");\n}","typeGuard":null,"tryCatchPattern":"try {\n    row = schema.deserialize(bytes);\n} catch (Exception e) {\n    log.error(\"Datetime field unparsable: {}\", e.getMessage());\n    // dead-letter or null-out the column\n}","preventionTips":["Standardize datetime exports to yyyy-MM-dd HH:mm:ss","Avoid epoch values in TIMESTAMP-typed text columns","Do a sample-file validation pass before production runs","Keep timezone suffixes out unless the format matcher supports them"],"tags":["datetime","text-format","deserialization","csv"],"backgroundTag":"invalid-date-format","analyzedSha":"cf67b549a7a6c35fa0beb12d83c62892427ea919","analyzedAt":"2026-09-10T21:44:55.265Z","contentChangedAt":"2026-09-10T21:44:55.265Z","schemaVersion":2},"datasetVersion":"2026-09-14T05:17:10.506Z"}