Skip to main content
Solved

Can FME expose a "day of the week" attribute at the time of running the workbench?

  • Sep 1, 2021 12:47 PM UTC
  • 2 replies
  • 147 views

Forum|alt.badge.img

Hi all,

I wonder if it is possible to have FME expose the day of the week at the time of running the workbench?

 

E.g. If the workbench is running today I would like to have an attribute "day_of_week" that has "Wednesday" as a value.

If it is run tomorrow the attribute should read "Thursday" etc etc

 

Thanks!

Ed

Best answer by nielsgerrits

One way to do this is to use a DateTimeStamper followed by a DateTimeConverter.

%A for "Full English weekday name"

 

If you want to do it in one go you can use

@DateTimeFormat(@DateTimeNow(),%A)

in for example an AttributeCreator or a fanout.

View original
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.

2 replies

nielsgerrits
VIP
Forum|alt.badge.img+67
  • Best Answer
  • Sep 1, 2021 12:57 PM UTC

One way to do this is to use a DateTimeStamper followed by a DateTimeConverter.

%A for "Full English weekday name"

 

If you want to do it in one go you can use

@DateTimeFormat(@DateTimeNow(),%A)

in for example an AttributeCreator or a fanout.


Forum|alt.badge.img
  • Author
  • Sep 1, 2021 1:06 PM UTC

That was quick. And good!

 

Thanks Niels 👍