I have a workflow that Tuesday through Friday I need to pull the previous day's data from a database, but on Monday I need to pull three day's worth (Friday, Saturday, and Sunday).
Is there something I can add to the below IF statement to also return Saturday and Sunday? or am I taking the wrong approach?
As is, it is giving me Friday's data if today is Monday, and just prior day for the rest of the week(so mostly working).
IF DateTimeFormat(DateTimeToday(), "%a") = "mon"
THEN DateTimeFormat([SCRIPT_RUN_DATE],"%Y-%m-%d") = DateTimeFormat(DateTimeAdd(DateTimeToday(), -3, "days"), "%Y-%m-%d")
ELSE DateTimeFormat([SCRIPT_RUN_DATE],"%Y-%m-%d") = DateTimeFormat(DateTimeAdd(DateTimeToday(), -1, "days"), "%Y-%m-%d")
ENDIF
Thanks