Welcome to the Alteryx Knowledge Base

Changes to Datetime Handling in .AVRO Files (Alteryx 24.2 and Later)
user

Created/Edited - 9/14/2025 by Renat Ishmukhamedov | Alteryx

Description

With the release of Alteryx Designer 24.2, we introduced a significant improvement to how datetime fields are written when using the .avro file format for data staging and transfer into target systems such as Databricks.

Issue

In earlier versions of Alteryx Designer (prior to 24.2), datetime fields were automatically converted to string values when written to .avro files. This behavior meant that users had to manually recast datetime columns back to datetime types in their destination systems when  publishing to a new table. While functional, this approach created additional overhead for customers building and maintaining workflows.

Environment

Alteryx Designer and Server

Prerequisites

Avro file format

Output connectors relying on .avro files (Databricks, Google Big Query, Redshift, Starburst)

Cause

To address this common challenge, Alteryx 24.2 introduced a change: datetime fields are now written to .avro files as true datetime types. Specifically, these fields are now stored in timestamp-millis format and are interpreted as UTC timestamps.


Understanding the Change

When writing datetime fields in .avro format, Alteryx now writes them as UTC-based timestamps rather than plain strings.

For example:

If you write the value:

2025-09-07 15:30:00

(without specifying a timezone), the resulting .avro file will store this as:


2025-09-07T15:30:00+00:00

This is a UTC representation of the datetime value.

If your original value was implicitly in Eastern Standard Time (EST), downstream systems that are timezone-aware (such as Databricks) will interpret this as:


2025-09-07 11:30:00

This shift occurs because the timestamp is read as UTC and displayed according to the session or system timezone.

While this change eliminates the need for manual type recasting, it introduces a new consideration: timezone context is now critical when working with datetime data.

Resolution

Best Practices for Handling Timezones

To ensure accurate representation of datetime fields in your target systems, we recommend one of the following approaches:


1. Standardize on UTC

Adopt UTC as the standard timezone across your systems and workflows.

This is the simplest way to prevent unintended time shifts, as all timestamps will be stored and interpreted consistently.


2. Output Datetime as Strings and Recast Later

If UTC standardization is not feasible for your organization, you can continue outputting datetime fields as strings to maintain precise local time values.

Here’s how:

  1. Add a Select Tool before your output connection (e.g., a Datastream In Tool).
  2. Convert the datetime fields to string.
  3. In your destination system, use a Post-SQL command to automatically recast these string values back to datetime columns, applying the correct timezone interpretation.

3. Use the ConvertToUTC Formula


For workflows where the timezone of datetime values is explicitly known, use the Formula Tool with the ConvertToUTC() function to normalize values before output:

CONVERTTOUTC([date], 'Zone')

Replace 'Zone' with the appropriate timezone identifier of the timezone your datetime data use. This ensures all datetime values are written in UTC with correct time offsets.

Additional Information

Looking Ahead

The Alteryx product team recognizes that handling datetime values and timezones can be complex, especially in distributed and cloud environments. We are actively working with a group of customers to further improve the way datetime and timezone information is represented and managed across the Alteryx product suite.

Your feedback is essential in helping us shape these improvements. Please share your experiences through the Alteryx Community or reach out to your Alteryx account team with your feedback.

Was this article helpful?