Hey guys.
I'm trying to use action tool to format the date to check whether it's Monday and Tuesday or other dates. However its not working.
Formula in action tool: IF (DateTimeFormat([#1],"%A") = 'Monday' or 'Tuesday') THEN '4' ELSE '2' ENDIF
Input text:
Action tool:
Anyone knows whats going on?
Thanks
You need to separate the OR into two parts.
IF DateTimeFormat([#1],"%A") = 'Monday' OR DateTimeFormat([#1],"%A")='Tuesday' THEN '4' ELSE '2' ENDIF
I believe you can use the IN as well.
IF DateTimeFormat([#1],"%A") IN ('Monday','Tuesday') THEN '4' ELSE '2' ENDIF
@gabrielvilella Thanks for the quick response!
I changed it, however I don't know how to say to the filter tool that it should change "test" column. How does it work? I am filtering today's date and its coming the number "4" when it should be "2".
I just noticed your field Test is numeric. You need to adjust the formula to have a numerical output by removing the quotes. Also, I can see that you have Test on the text input and Teste on the filter, they are not the same, you should adjust that.
IF DateTimeFormat([#1],"%A") IN ('Monday','Tuesday') THEN 4 ELSE 2 ENDIF