Logic for date of birth with age

Discussions about CSEntry
Forum rules
New release: CSPro 8.0
Post Reply
juan pablo
Posts: 30
Joined: July 27th, 2017, 4:02 pm

Logic for date of birth with age

Post by juan pablo »

Dear team

They could help me with the following query.

I'm guiding myself on an example data entry Chapter5Exercises to be able to reuse its logic to detect the inconsistency between date of birth and age but when I apply it to my data entry I get the following error

ERROR: '' is a reserved word - use another name
ERROR: Single variable - can not have subscript (unexpected left parenthesis) near line 47 in FECHA_NC_DIA procedure
Attachments
CONSULTA.jpg
CONSULTA.jpg (187.52 KiB) Viewed 3761 times
khurshid.arshad
Posts: 571
Joined: July 9th, 2012, 11:32 am
Location: Islamabad, Pakistan

Re: Logic for date of birth with age

Post by khurshid.arshad »

Dear;
Please use this code. I hope it works.
I think you have the maximum number of times is 1, you don't need curocc() in your code.

Code: Select all

Numeric calculateage=datediff(DATE_OFF_BIRTH,
							FECHA_ENCUESTA,"y"); 
Best.
a.
juan pablo
Posts: 30
Joined: July 27th, 2017, 4:02 pm

Re: Logic for date of birth with age

Post by juan pablo »

thank you very much dear khurshid.arshad

  his indication gave solution to my problem
Post Reply