Skip to main content
Released

Create a Now() FME Feature Function

Related products:FME Form
SagitAtSafe
rylanatsafe
danilo_fme
mark2atsafe
danielleatsafe
  • SagitAtSafe
    SagitAtSafe
  • rylanatsafe
    rylanatsafe
  • danilo_fme
    danilo_fme
  • mark2atsafe
    mark2atsafe
  • danielleatsafe
    danielleatsafe

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 a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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
Evangelist
  • 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+32
  • 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
Contributor
Forum|alt.badge.img+12
  • Contributor
  • July 17, 2016

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


bruceharold
Contributor
Forum|alt.badge.img+17
  • Contributor
  • 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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings