I have a interesting problem. I want to use a date picker and if date is a Monday then subtract three days where the resultant day would be a Friday.
I have a business scenario that calls for the date picker to -1 days, but not to fall on a weekend.
Here is my attempted formula (it has errors).
I am trying to write an IF ELSE
Pseudocode explanation: If day is Monday then subtract three days. ELSE subtract one day
If(Weekday(DataCardValue8.SelectedDate),2,DateAdd(DataCardValue8.SelectedDate,-3))
else DateAdd(DataCardValue8.SelectedDate,-1)
My attempt at using the Weekday() function was to isolate the day of the week as Monday which was designated by the 2.
Can someone look at my formula and fix both the IF ELSE statement and the logic? I'm stumped. Thanks.

Report
All responses (
Answers (