How to select the date from calendar 180 days ago?

How can I filter and select the 180 days ago date from calendar, I am using Now.adddays(-180) but its not working. Below is the calendar screen shoot. And which activity will use to get the exact date.

image

Hi @tayyabimtiaz1
we can use type into activity to write the date (Date To : field)

can u try that

image

use this var in Type into activity

HI @tayyabimtiaz1

Check manually in that date field whether you can type there ,If you can type there

You can use Type into and give expression like

Now.adddays(-180).ToString(“dd/MM/yyyy HH:mm:ss”)

Regards
Gokul

Hi Gokul,
We can not type there any thing. The only we can just select from the dropdown calendar. and the date format you provided is not working.

image

Try changing the variable type as String for the variable PrevDate

yes i have set it but select the wrong date

Can you try my syntax @tayyabimtiaz1

Yes i have tried it. screen shoot also shared

So prevdate variable type is date right?

Now i am using that “DateTime.Now.AddDays(-180).ToString” but this select the 1957 years date . dont know why?

no it is string variable type

Then that expression should work eventually

let me pass here

Datetime.now.AddDays(-180).ToString(“MM/dd/yyyy”)

Try change your format to “MM/dd/yyyy” instead of “MM/DD/YYYY”

yes i have tried this one but not select the exact 180 days back date.

image

In calendar the format is MM/DD/YYYY HH:MM:SS and but at the end of calendar the date today just shown as 3/1/2022. That’s why i am confused and can’t set the proper format.

image

I think the format in the field is “dd/MM/yyyy”

and also you need the date which 180 days back from the current date ,right?

Yes, exactly like that. i just want to select the date which is 180 days back from today date which is 2 nov 2021.

Okay so 180 days back from the given date or today’s date which 1 mar 2022

from today to 180 days back difference is 2nd Nov 2021. which i need to select.

image

Okay so these values will be in excel and you need to convert it to the format which is in the calender , right?