Skip to main content
Solved

attribute creator

  • June 4, 2015
  • 1 reply
  • 13 views

ingalla
Contributor
Forum|alt.badge.img+10
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.

Best answer by gio

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}).*
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, 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.

1 reply

gio
Contributor
Forum|alt.badge.img+15
  • Contributor
  • Best Answer
  • June 4, 2015
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}).*

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings