I currently have this issue with Holiday dates. I deal with Bank data and a bank for some reason doesn't give its data out the day before a holiday and the day of. (Example this past weekend was long weekend, it didn't give data for Friday and Monday) And I want it to give me data with the following criteria: If today is Tuesday and yesterday was a holiday then give me Fridays data & If today was Monday and Friday was a holiday then give me Thursday data.
This is a rough draft of what I have but I have been playing around and can't seem to get it working. Currently right now I need data from Friday and Yesterday.
If (DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 1) and [Day_status_Code] = "H" then
IF Day_Caption = "Friday" then
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 3) One file (Friday)
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 4) second file (Thursday)
elseif Day_Caption= "Monday" then
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 1) One file (Monday)
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 3) second file (Friday)
endif
ELSEIF (DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 1) and [Day_status_Code] = "W" THEN
IF Datetimeformat(DateTimeToday(),"%a")="Mon" THEN
(DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days") = 3) For Friday
ELSE DateTimeDiff(DateTimeToday(),Datetimetrim([As of Date],"days"),"days")=1 The previous day
ENDIF
endif
Any Suggestions or questions is appreciated.