Skip to main content
Hello

 

I have a very simple query about attributes but can not get the right result for the life of me.

 

I have a text attribute called CHANGE.  This includes a date and text as shown below:-

 

2014-09-26 New

 

I have a tester which finds all of the words NEW within that field and lets them pass the Tester, this works fine.

 

I then need to extract the year, the first four digits and create an attribute called year, place the year value within that attribute..

 

 

I managed to get the year out into a list, which works fine in inspector, but does not get transferred accross to the shape file.  What could be wrong?

 

 

Thanks in advance.
UYou could parse out the word "NEW", remove the space and convert the attirbute to a date field. Then you can extract the year using a datefunction or transformer.

 

 

Or you could just parse out $(\\d{4}).*

Reply