Calculate the Age of a person by now - BOD

How to calculate age using date of birth using excel in uipath?

CInt(New DateTime((Now - Covert.ToDateTime(row.item(“DOB”))).Ticks)).toString(“yyyy”))

Tried this but no result

grafik

How to add column name to this condition?

now.Year - CDate(row(“DOB”).toString).Year

Nothing changed

please share with us the details from your implementation
how is it used in the imp
what are you getting / facing

thanks

I need to calculate the age from date of birth given in excel sheet…if the age is greater that 18 i should print in new tab else another tab, fetched the excel and set an assign condition inside for each and then used if else to set Age<18 but nothing happens


all the tab is same data

No Error but excel tab contains same data for both tabs

please have a look on the screenshot from above where we do use <=

same result

a too short feedback.

please share the updated imp part
have you debugged (e.g. stepwise the relevant parts and crosschecked the variable values during the flow?

in case you want to toute a person with the age of 18 to major then change
If now.Year - CDate(row("DOB").toString).Year >= 18
Then: major
Else: minor

I checked that too, but no result…

Your write range is using the same variable. What’s that variable?

its data table variable name

Corrected Version below

@ayana_augustine - Let me ask you this first…

  1. what is your DOB column format?
  2. What is your system local settings time format? Because Cdate won’t covert all the date formats , it will work as per your local settings. see below…

image

yes its different

Please read my post my again…i asked for the format