Skip to main content

I have an AttributeCreator that is meant to create a new attribute called "regDate" with the value:

@DateTimeParse(@Value(supByRegPlanDate), %Es)

 

The output for regDate is the string: @DateTimeParse(1543293100000, %Es)

However, I am expecting an output similar to: 20181127043140

Any suggestions why the output is showing the expression that had obtained the value from the feature, but, not created a DateTime?

 

 

Did you use the TextEditor?

You will probably need to use the Mathematical Editor.

Hope this helps.


Your input time is not in seconds but in milliseconds, convert to seconds before parsing. You cannot use the arithmetic editor for datetime expressions (but you will to convert to seconds!) I think you have to separate it into two statements e.g.


Use the following expression @DateTimeParse(@Evaluate(@Value(supByRegPlanDate)/1000),%Es)

 


Your input time is not in seconds but in milliseconds, convert to seconds before parsing. You cannot use the arithmetic editor for datetime expressions (but you will to convert to seconds!) I think you have to separate it into two statements e.g.

Hello egomm,

I am unable to view your example.

Phil


Did you use the TextEditor?

You will probably need to use the Mathematical Editor.

Hope this helps.

I did use the String Editor, when I change to the Arithmetic Editor i get the output of <null>.


Use the following expression @DateTimeParse(@Evaluate(@Value(supByRegPlanDate)/1000),%Es)

 

That expression give the output of: @DateTimeParse(1543293100, %Es)

Previously I had the output of: @DateTimeParse(1543293100000, %Es)

I am still not getting the @DateTimeParse expression to evaluate.

 


How do I test whether my version of FME has a licence or access to use the @DateTimeParse function?


Your input time is not in seconds but in milliseconds, convert to seconds before parsing. You cannot use the arithmetic editor for datetime expressions (but you will to convert to seconds!) I think you have to separate it into two statements e.g.

It did need to be two separate statements, thank you.


That expression give the output of: @DateTimeParse(1543293100, %Es)

Previously I had the output of: @DateTimeParse(1543293100000, %Es)

I am still not getting the @DateTimeParse expression to evaluate.

 

What version of FME are you using? It's working for me.


What version of FME are you using? It's working for me.

I am using FME 2016.1


Is this what you're looking for @DateTimeParse(@Evaluate(@div(@Value(supByRegPlanDate),1000)),%Es)


I am using FME 2016.1

I don't have that version anymore, it does work in 2017 and 2018.1 though.

I'm curious, in the attributeCreator if you just entered @Evaluate(@Value(supByRegPlanDate)/1000) do you get 1543293100 or the expression as text?

 

 

Likewise of you entered @DateTimeParse(1543293100, %Es) does it give you the correct formatting or the expression again?

Reply