on 10-26-2018 1:28 AM
I'm trying to get the age of my user in crystal report using parameter and current date.
This is my formula for the crystal report.
INT ((CurrentDate - {?txtbdate}) / 365.25)
For example: the date in {?txtbdate} is 1996-07-29 and today is 2018-10-26.
The age must be 22.
When I execute it, a popup message appear saying "A number is required here."
Hi Aldrin,
Change the datatype of the {?txtbdate} parameter to Date.
If you wish to keep it as string, then modify the formula to:
datevar d := if isdate({?txtbdate}) then date({?txtbdate});
INT ((CurrentDate - d) / 365.25)
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.