Skip to main content
Released

Create a Now() FME Feature Function

Related products:FME Form
  • April 14, 2016
  • 7 replies
  • 118 views

Please can you add a new FME Feature Function which calculates the current date and timestamp?

You have a Timestamp() function but that requires an input string and you have a Timestamper transformer but I think it makes sense to have a Now (or Today) function similar to applications like Excel.

This means you can then test a date/time attribute against the current date/time in a Tester transformer without needing an additional transformer or use of Python.

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

david_r
Celebrity
  • April 14, 2016

What would be the difference between @Now() and @Timestamp('^Y^m^d^H^M^S') ?


Convenience and intuitiveness and succinctness.


ebygomm
Influencer
Forum|alt.badge.img+48
  • Influencer
  • April 19, 2016

You can use a dateformatter on an attribute with value Today to return today's date.

I'd like to see this functionality rolled up into one transformer, I frequently use an attributecreator followed by a DateFormatter to produce a date/time to test against, but the fact that you can do this is not obvious.

The ability to easily calculate whether something was done prior to "6pm last Friday" is incredibly useful for me, and very simple using this method in FME


mygis
Supporter
Forum|alt.badge.img+15
  • Supporter
  • July 17, 2016

I felt as if I was home for a second. @daleatsafe


bruceharold
Supporter
Forum|alt.badge.img+19
  • Supporter
  • July 21, 2016

There are more aspects to date handling:

APIs often want UTCNow()

Dates should be timezone aware.

They make your fingers sticky


Forum|alt.badge.img

@DateTimeNow() function is now available in FME 2017.0. FME 2017.1 will also have new DateTimeStamper based on the @DateTimeNow().

Both - function and transformer - can output UTC time, local unzoned time, or local time with UTC offset.


f.kemminje
Contributor
Forum|alt.badge.img+11
  • Contributor
  • March 3, 2020

@david_r

TIMESTAMP gives us fraction of seconds as well. @now rounding off seconds