Date difference function calculation

Hi All
Trying to use datediff function between todays and date and a set of dates in excel file

Objective is to find : Whos age is greater than 18

Expression
Datediff(0,"Today()","[Pcollection.Date of Birth]") used in a decision to check if 'Yes'
mark completed else raise an exception

Issue:
Not able to get the result

Issue identified
Date of birth in collection is in text format. Collection details come from "Get next item"

Suggestion on the issue please
 

Sachin_Kharmale

Active Member
Hi,

1.The today function should be written as Today() it does not having double quotes around it.
2.The collection date Date of Birth column with data type Text so first you need to convert in into date data type.

You can use the following expression in calculation stage so it will returned difference between two dates in years.

DateDiff(0, ToDate([Student.DOB]), Today())
View attachment 1557820931390.png


Best Regards,
Sachin
 
Top