Necesito ayuda para comparar fechas de excel con la fecha actual

porfavor alguien me podria ayudar con una condicion de un if para comparar fechas en excel con la fecha actual en este caso seria de vigencias de contratos que si se cumple la condicion que me diga que necesita renovar y sino que aun tiene vigencia

Hi @Ronaldo_Roman_Ramirez

As you need to compare the excel dates with todays date and if its equals need to update as its valid or its To be renewed right!

You need to do the parse on date and get it the format we need and then we need to check with todays date in if condition

DateTime.ParseExact(row("columnname ").ToString.Substring(0, 10),“MM/dd/yyyy”, System.Globalization.CultureInfo.InvariantCulture).toString(“dd-MM-yyyy”).Equals(now.toString(“dd-MM-yyyy”)

Then Renewal not needes

Else needed

Regards

hola @pravin_calvin
creo que no me funciono, mira solo necesito comparar fechas con la fecha actual estas son algunas por ejemplo:
image

y ahora lo que quiero es simplemente me diga si estan vigentes o no comparandola con la fecha actual.
image

Hi @Ronaldo_Roman_Ramirez

Please refer to the skeleton xaml below!

Main.xaml (10.7 KB)

Regards

@pravin_calvin
hola disculpa por tantas molestias pero como quedaria dentro de un switch ya que lo estoy haciendo para difentes casos mira te adjunto imagen como seria.
image
espero me puedas ayudar apenas soy nuevo en uipath.
muchas gracias
saludos!

HI @Ronaldo_Roman_Ramirez

In the if condition

DateTime.ParseExact(CurrentRow(0).ToString, "dd/MM/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy").ToString.Equals(DateTime.Now.ToString("dd-MM-yyyy"))

Refer to the screenshot

Regards
Gokul

Hi @Ronaldo_Roman_Ramirez

In if condition you need to pass the second mentioned condition in as in xaml!

Regards

(post deleted by author)