Skip to main content



Hello, Please see picture above, DateTimeNow is my value i am feeding into DateTime attribute, which matches the preview data format, but the output keeps getting rejected saying the errors above. I’m a bit stumped to as why this is not working. Any ideas?

Thanks.

I managed to do this via AttributeManager with value:
@DateTimeFormat(@DateTimeNow(),%Y-%m-%d-%H-%M-%S) instead.

But I would still like to know why the above would not work. 


What if used a different Attribute Name as the input to DateTimeConverter instead of “DateTimeNow”?

Works for me in FME2021 by feeding a DateTimeConverter with the Date/Time value output of DateTimeStamper.   Also if I just send a value from AttributeCreator using DateTmeNow()

It could be that using an Attribute named DateTimeNow is causing an issue.  That is the same name as an FME function DateTimeNow()  That would likely trace it to a bug introduced in later FME version.


Sorry…...error message could also be from feeding DataTimeConverter a Feature with a Missing or Null value in an Input Feature.

It probably works with AttributeManager in the way that AttributeManager will soft fail for Missing/Null values as the input to @DateTimeFormat().   To get equivalent soft error handling in DateTimeConverter set the Parameter “Passthrough null, empties or missing” to Yes.  Can test the output of this to see that all Features process properly with a Tester with Attribute Has Value.


 


What if used a different Attribute Name as the input to DateTimeConverter instead of “DateTimeNow”?

Works for me in FME2021 by feeding a DateTimeConverter with the Date/Time value output of DateTimeStamper.   Also if I just send a value from AttributeCreator using DateTmeNow()

It could be that using an Attribute named DateTimeNow is causing an issue.  That is the same name as an FME function DateTimeNow()  That would likely trace it to a bug introduced in later FME version.




 

I’ve also set the type to DateTime (just now, previously it was varchar), changed the column name

 

still the same output with an error. 



The tester says “fs309usg3sj30” has a value, yet when pass through null or empties missing values on the DateTimeConverter is set to yes, it passes the item through (without doing any changes)


Very odd.  Using the same workflow as you in FME2021 workspace works fine.    The error message is saying that an Attribute by that Name is Missing from the input Feature, even though can see on Data Inspector it clearly exists.

Maybe post up the FMW for FME’ers to see if they can replicate what looks a bit like a bug?


Very odd.  Using the same workflow as you in FME2021 workspace works fine.    The error message is saying that an Attribute by that Name is Missing from the input Feature, even though can see on Data Inspector it clearly exists.

Maybe post up the FMW for FME’ers to see if they can replicate what looks a bit like a bug?

Thanks for giving it a go, I think it must be a bug. 

I am using version 2024.0.1.0


Hi,

I think the bug is UI related. It occurs when you apply the Datetime Attribute (in the DateTimeConverter) you get the @Value(timeAttrName) notation on the attribute. 

Hit the dot-button and select the attribute with the arrow and you should be fine.

 


Hi,

I think the bug is UI related. It occurs when you apply the Datetime Attribute (in the DateTimeConverter) you get the @Value(timeAttrName) notation on the attribute. 

Hit the dot-button and select the attribute with the arrow and you should be fine.

 

Yeah, that’s definitely a bug that’s been there for a few versions and still sometimes catches me by surprise.


Hi,

I think the bug is UI related. It occurs when you apply the Datetime Attribute (in the DateTimeConverter) you get the @Value(timeAttrName) notation on the attribute. 

Hit the dot-button and select the attribute with the arrow and you should be fine.

 

 


This is it! Thank you! When I hit the downward arrow and select the variable it does the @value(“variable”) rather than the actual variable, as you’ve described.

Thank you for this! 

Apologies for not selecting the right answer on your response, but the reply to it!


Reply