DateDiff expression not throwing an exception

obungle

New Member
Playing around with decision stages today, I've added a decision stage in my process where it is supposed to throw an exception if a date of birth is less than 18 years old. The expression I have come up with is as follows:

DateDiff(0, 18, [Patient Data.Date of Birth], Today())

My logic was as follows: 0 is the interval for years (, 18 is the amount of years, then the start date was from the collection, then today for today's date. It isn't throwing any exceptions for me and I'm unsure if it is all wrong or just something simple I need to switch.

Thanks in advance
 

Sachin_Kharmale

Active Member
Use The expression in decision stage to check age is less that 18 years

DateDiff(0, [ColName.DOB], Today()) <= 18

Note- [ColName.DOB] is your input date that you want to check.
 
Top