Skip to main content
Solved

Hello, I'm using a string searcher to find "Dates" out of a "Comments" field. I have a column of all matches (Screen shot attached). How can i extract the most recent date out of all matches? Probably would help if I change "/" to another symbo

  • November 29, 2022
  • 1 reply
  • 7 views

Hello, I'm using a string searcher to find "Dates" out of a "Comments" field. I have a column of all matches (Screen shot attached). How can i extract the most recent date out of all matches? Probably would help if I change "/" to another symbol.

Best answer by markatsafe

@egeiser​ You can match the dates with the regex: (\\d{1,2}/\\d{1,2}/\\d{1,2}) in the StringSearcher. Under Advanced, add an All Matches List Name: _allDates. If the last date in the pattern is always your recent date then you can just use ListIndex with List Index to Copy: -1

If the last date in the list isn't the most recent, then you'll have to explode the list, Use DateTimeConverter to make the date an FME date and then pick out the most recent from there

View original
Did this help you find an answer to your question?

1 reply

Forum|alt.badge.img+2
  • Best Answer
  • November 29, 2022

@egeiser​ You can match the dates with the regex: (\\d{1,2}/\\d{1,2}/\\d{1,2}) in the StringSearcher. Under Advanced, add an All Matches List Name: _allDates. If the last date in the pattern is always your recent date then you can just use ListIndex with List Index to Copy: -1

If the last date in the list isn't the most recent, then you'll have to explode the list, Use DateTimeConverter to make the date an FME date and then pick out the most recent from there


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