I need to read date of birth from excel sheet and calculate the age and write the age to the excel sheet. How that can be done in UiPath? Can somone help me
You can use the DateDiff method available from the DateTime class.
- Get the DateDiff between date of birth and today’s date.
- Use the DateInterval.Year to get the difference in years.
You can use the DateDiff function.
Syntax: DateDiff(DateInterval, Date1,Date2)
Code: DateDiff(DateInterval.Day, “2016-01-30”,“2016-01-30”)
It will return the number of the days between the two dates as Integer Type.
Hope It helps!