How does timestamp inference actually work in Read Excel Advanced?

What users observe

Some columns are inferred as TIMESTAMP instead of STRING.


How timestamp inference works

When inferDatesAsTimestamp = true:

  1. Sparkflows samples column values

  2. Each value is tested against a set of supported date/time formats

  3. If all valid samples match, the column becomes TIMESTAMP


Supported formats include

  • yyyy-MM-dd

  • dd/MM/yyyy

  • MM/dd/yyyy

  • yyyy-MM-dd HH:mm:ss

  • yyyy/MM/dd

  • ISO date and datetime formats


When timestamp inference does NOT occur

  • Mixed date and text values

  • Partial matches

  • Invalid or inconsistent formats

In these cases, the column remains STRING.


Recommendation

Enable timestamp inference for analytics.
Enforce schema for compliance or reporting pipelines.