Relevance help with Current date as specific format

Hey guys, thank you in advance, I dont dig into relevance very often. I have the two things I need, but having trouble getting them together.

 >   >  exists file "c:\temp\20221024-RCSPtr.log" whose (exists (line of it) whose (it contains "POSPrinter enable failed"))
> > 
> >     ((year of it as string & month of it as two digits & day_of_month of it as two digits) of date (local time zone) of it) of (now)

I need to get the β€œ20221024” piece in the file name to reflect the current date, just as it is in the second piece of relevance. Thank you again

I’m on my mobile so can’t format this properly but I would look to use your bottom relevance piece as a property and then use the property in the filename.

parameter "logname"="((year of it as string & month of it as two digits & day_of_month of it as two digits) of date (local time zone) of it) of (now)"

exists file "c:\temp\{parameter "logname"}-RCSPtr.log" whose (exists (line of it) whose (it contains "POSPrinter enable failed"))
1 Like