[Date Inquiry] Can I set specific day of the week?

Dear all,

Could you please help for setting specific day of the week?
I’d like to set every last week Tuesday with Type Into activity.
For example, if today is 19/03/2021 then robot should enter 09/03/2021 in the field.
Is it possible?
Date format will be yyyyMMdd(20210318)
image

@Dorothy_lee

Try with below expression

DateTime.Now.AddDays(((DayOfWeek.Monday) - (DateTime.Now.DayOfWeek)) - 6).ToString("yyyyMMdd")

Mark as solution if this helps you

Thanks

Thank you so much… !!! It’s working perfectly:)))) I’ll utilize for other function !
Happy Automation !!! :relaxed:

1 Like

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