Tutorial: Working with Date and Time Attributes

Donal Mateer
Donal Mateer
  • Updated

Introduction

Dates and times are transformed in FME using a trio of powerful transformers. These transformers are:

These transformers can carry out a multitude of operations on dates and times. They are backed up by a variety of FME Date/Time functions that can be used in Text Editor dialogs and the like.

Some examples of these functions are:

  • @AddDateTime(): Adds an ISO 8601 duration to a datetime; one aspect of datetime arithmetic.
  • @DateTimeFormat(): Converts a date/time value from one format to another.
  • @CurrentDateTime():Creates a timestamp with the current datetime. With no argument, it returns unzoned local time in ISO 8601 format: for example, 2026-06-19T11:31:44.033946.

     

Upgrading to FME 2026.1 or later

In FME 2026.1, seven of the FME date/time functions gained ISO equivalents, and ISO 8601 became the default datetime format in FME. The original functions continue to exist and behave exactly as they did before; they are simply no longer the default and are no longer listed in the Text Editor. Existing workspaces continue to run unchanged, and there is no need to update them. When you author a new workspace, or if you choose to update an existing one, you can migrate to the new functions. Functions that were not renamed, such as @DateTimeFormat(), are unaffected.

Upgrading a transformer is a separate decision, and two of the three transformers change their output when you do:

  • DateTimeStamper: the new Output Format parameter defaults to ISO.
  • DateTimeConverter: the Output Format default is now ISO (auto format).
  • DateTimeCalculator: unchanged in this respect. It preserves the format of its input: ISO in, ISO out; FME in, FME out.

Where a downstream step depends on the old YYYYMMDDhhmmss format, filename generation and fanouts, string-based date comparisons, SQL statements, regular expressions, database loads, or custom scripts, either leave the transformer at its existing version, or upgrade and then set Output Format back to FME (DateTimeStamper) or FME (auto format) (DateTimeConverter).

Leaving the version unchanged is the safer option: upgrading a DateTimeConverter also changes how it handles invalid input values, which the Output Format setting does not affect.

 

Articles

Handling Local Timezones, UTC, Daylight Savings Time, and Leap Unit Adjustments

Besides simple date and time conversions, the DateTimeConverter transformer can handle timezones. It can fetch the offset of zoned datetimes, remove the offset, or set an offset on an unzoned datetime. The DateTimeCalculator can be used to add or remove a single hour for daylight savings purposes. FME is also able to handle both Leap Years and Leap Seconds.

Working with Database Date and Time Attributes

Each database format may have its own unique structure for date and time attributes. Transformers can be used to convert strings into the format that the database expects, and to execute complex SELECT statements to work with date and time attributes.

Including Dates in the Names of Output Features or Files

You can include system-generated time or date stamps in the names of output files or feature types by using a DateTimeStamper in conjunction with a fanout.

General DateTime Information and FAQs

This page answers all your questions about datetimes in FME, including what FME Hub transformers exist, where I can find documentation, whether Fractional Seconds are supported, and if we will ever support Stardates!

Was this article helpful?

We're sorry to hear that.

Please tell us why.

As of January 14th, 2026, comments on knowledge base articles have been closed. To make sure questions don’t get missed and to enable more community support, we’ve moved discussions to the FME Community. If you have a question or a comment about this article, please create a new post or create a support ticket.