I am trying to manipulate dates using the below partial workflow:
I am trying to match startdate against CRDate + 3 years. Whatever date I use for startdate or CRDate, the IF statement always says that it’s ‘more than 3 years’.
I am not sure if I am using the correct code in the IF condition, but that’s what I have tried so far.
Can anyone please assist?
Hello @Clintonnn I did not get why you are >? covnerting string > Date > string >split
you can directly use
CDate(strDate).AddYears(3) > Cdate(strDate2)
Is your date format “MM.dd.yyyy” or “dd.MM.yyyy”?
Anyway, perhaps you should compare them as DateTime as the following.
Sequence.xaml (6.9 KB)
Also in your if condition you are not matching dates, you are matching strings… thats why you are getting unexpected result
Thank you everyone for your very quick help!
I can only mark 1 answer as a solution but all gave different and valid ways of completing this calculation - I really appreciate it!
Thanks you so much again and have a great day!
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.