Solved

How to use StringSearcher to find today's date in a list

  • 13 March 2023
  • 1 reply
  • 3 views

Badge

Hello, i have a list of files from an FTP server that I have read into a List. The last field in the list is the file name. The file name generally follows this format: "ProjectInfo_YYYYMMDD". YYYY is the four digit year, MM is the 2 digit month, and DD is the 2 digit day. I want to choose the one that matches today's date. I'm guessing this can be accomplished with the use of a user param or regular expression but I can't seem to find a reference on it. Any assistance would be appreciated.

icon

Best answer by dustin 13 March 2023, 18:04

View original

1 reply

Userlevel 3
Badge +26

One way to accomplish with a single Tester or TestFilter:

Set the left value to:

@Substring(@Value(file_name),-8,8)

Set the right value to 

@DateTimeFormat(@DateTimeNow(),%Y%m%d)

image

Reply