Datediff function

Hello,

I think I must use Datediff function, but I miss something.
currday

I’m trying for Current Day - 7 days = New day

Thank you.

I don’t understand what you are trying to do. Can you elaborate more?

@Veselin_Ganchev

Try this:

     Now.AddDays(-7).DayOfWeek
1 Like

@Rocki_Jan
I need to subtract 7 days from the current day.
So I will receive new date that I need it.

@lakshman It’s give me error, because of the DayOfWeek.
I change a little bit your proposal to:
DateTime.now.AddDays(-7).ToString(“dd-MM-yy”)
And work perfectly.
Thank you!

1 Like

@Veselin_Ganchev

I thought you want day of the week. That’s i mentioned like this.

Glad to help you. Happy Automation :grinning:

@lakshman
No, problem, it’s my bad that I don’t explained fully.
But proposal to read about what is AddDays and how to use it was the point of solution.

1 Like

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