Finding the starting business date of the given date

For example todays’ date is 18.04.2024. How to find starting work day which is 15.04.2024

Weekend is saturday and sunday

Could you please help me?

Hi @Betul_Dundar ,

To find the date of monday (Start of work week) , in an assign activity use the below

LHS :
MondayDate(string variable)
RHS:
DateTime.Today.AddDays(-(today.DayOfWeek - DayOfWeek.Monday)).ToString(“yyyy-MM-dd”)

Hope this helps you out.!

Thanks,
Gautham.

@Betul_Dundar

Try this

now.AddDays(-CInt(now.DayOfWeek)+1)

Hello @Betul_Dundar ,

I have attached below the Screenshot of the Code:

image

image

I hope this helps.
Regards;)

Thank you! @Gautham_Pattabiraman

1 Like

pls give me a solution

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.