How to compare whether a date is greater than another

Hi,
within an automation flow,
I collect a date from a scraping.
This date becomes as String. “Mm / dd / yy”.
image

At some point, I have to insert a Flow Decision, where I have to compare the collected date (DueDateS) compared with today and if greater, carry out operations … if less, perform other actions.

Does anyone know how to do?

Hi @AaronMark

Please unzip and see this workflow

Compare_Date_In_condition.zip (27.9 KB)

condition will be
DateTime.Parse(row(“FirstDate”).ToString)>DateTime.Parse(row(“SecondDate”).ToString)

Regards,
Gulshiyaa

Hi, thanks
I felt like I had already done this type of comparison, but it didn’t work.
I try to watch your WFlow.
What activities I need to import?

image

Oh!
I solved it by finding the string.

After scraping the date as a string, “MM / dd / yy”
image

I converted it to DateTime with the command:
Datetime.ParseExact(DueDateS,“MM/dd/yy”,System.Globalization.CultureInfo.InvariantCulture)

image

In Flow Decision I compared the two date
image

image

Thanks anyway for the indications

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