Skip to main content
Solved

Automatically change year in new attribute

  • April 9, 2025
  • 1 reply
  • 27 views

vxn43
Supporter
Forum|alt.badge.img+18

I have a new attribute named EXPORT_YEAR. I want the Attribute Value to automatically change to 2026 at 12:00AM Jan 1, 2026. Until then it will stay 2025. Is this possible? if yes, what expression do I use?

 

 

 

Best answer by takashi

If you need to get the current year when the workspace is run, DateTimeStamper might help you.
Or, you can also use this expression to retrieve the current year.

 @Left(@DateTimeNow(),4)

 

See here to learn more about FME Date/Time functions.

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/!Transformer_Parameters/Date-Time-Functions.htm

View original
Did this help you find an answer to your question?

1 reply

takashi
Influencer
  • Best Answer
  • April 9, 2025

If you need to get the current year when the workspace is run, DateTimeStamper might help you.
Or, you can also use this expression to retrieve the current year.

 @Left(@DateTimeNow(),4)

 

See here to learn more about FME Date/Time functions.

https://docs.safe.com/fme/html/FME-Form-Documentation/FME-Form/!Transformer_Parameters/Date-Time-Functions.htm


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