Get the previous business day in a calendar? Please note that I need to consider if the previous day is a weekend. So if today is Monday, what I need to get is the Friday last week

Hi Team,

get the previous business day in a calendar? Please note that I need to consider if the previous day is a weekend. So if today is Monday, what I need to get is the Friday last week

Hi @428e10c08f35f5a9e7b4cece6

Check out this docs

Regards
Gokul

HI @428e10c08f35f5a9e7b4cece6

Check out this expression

If(Now.AddDays(-1).DayOfWeek.ToString="Sunday",Now.AddDays(-3).DayOfWeek.ToString,Now.AddDays(-1).DayOfWeek.ToString)

Hope this helps

Regards
Sudharsan

If you want as date

If(Now.AddDays(-1).DayOfWeek.ToString="Sunday",Now.AddDays(-3).ToString("dd.MM.yyyy"),Now.AddDays(-1).ToString("dd.MM.yyyy"))

Regards
Sudharsan