Skip to main content

Hi

I have a simple spreadsheet that has a month column in text ie January, February.

How do i convert this to a number? So for January it would be 01, February 02 etc etc.

I've tried using AttributeValueMapper with the following source value;

@Value(Month)='January'

and a destination value of 01

but no luck.

Would be grateful if someone could suggest how i can do this

thanks

Simon Hume

The AttributeValueMapper should work. Case matters.


Thanks very much for you help, has worked a treat#

regards

Simon Hume


Just for your information. The StringPairReplacer could also be uses here. And, I found this expression works fine in FME 2017.1 beta. FME 2017.1 coming soon!

@DateTimeFormat(@DateTimeParse(@Value(month)012017,%B%d%Y),%m)


Reply