Validating Birth Date Compared to Today's Date

I am working on a project that requires comparing someone’s birth date to today’s current date to see if they are older than 15 but less than 100. I understand there is a now function to get today’s date…but I’m not sure how to approach doing the math to compare the dates.

If anyone has any practices or advice for this that would be great. Thanks

See this -

If I understand correctly the Compare Date activity in UiPath only returns a boolean? I’m looking to get the age of this person based on the difference between the two dates.

Can you elaborate with example dates

Say I’m comparing the birth date 5/13/1952 and today’s date 8/8/2018. I ant to see if this person is over 100 years old (clearly they aren’t) but this is not so obvious to the computer. I am looking for a way to do this. I am now trying to use the AddDays function.

I have solved this problem by using the AddDays function to the birth date and then comparing that new date to today’s date.

1 Like