How to validate a date ,the entered date should be greater than or equal to todays date and date should be smaller than two years from today

My input Date is in String format which I am taking from the user.
The entered date should be greater than or equal to today’s date and date should be smaller than two years from today or else will throw an error message

Hi @Dimple_Mandal

Here is the sample workflow
Sequence.xaml (7.6 KB)

Regards
Sudharsan

What is the date format user enters?

@prasath17 user enters in dd/MM/yyyy format but I converted it to MM/dd/yyyy and then I am checking it.

Here is updated workflow
Give it a try and let me know
Sequence.xaml (7.6 KB)

Regards
Sudharsan

Can you show me a sample with True and false case? I am not clear …

I tried to do it like below
DateDiff(DateInterval.Day, Now, Convert.ToDateTime(myDate)) <0 Or DateDiff(DateInterval.Day, Now, Convert.ToDateTime(myDate))>729

is their any other way to check it

???