on 11-15-2016 6:49 AM
Hi All,
I had a trouble writing formula in Crystal Report.
Here is my issue. Please check.
I need to write formula for Aged Days and this should be ( Currentdate - My date field)
So I written: CURRENTDATE - cdate(my date field) It is working fine.
But, my date field is having few blank values means Nulls at that place it showing "#".
So at that time it is throwing error : "BAD DATE FORMAT" So I should eliminate "#" whenever it comes and replace it with "0"
so that it wont throw error. i tried bot these formulas still error.
IF ISNULL({Constituent.LastName}) THEN {Constituent.OrgName} ELSE {Constituent.LastName} IF NOT ISNULL({Constituent.LastName}) THEN {Constituent.LastName} ELSE {Constituent.OrgName}
Please check if possible let me know the solution. That should be sinple IF statement where we need to put "0" whenever it get "#". That it
Thanks in Advance.
Priyanka.
Hi Priyanka,
Try:
CurrentDate - (If {Date Field} = '#' then cdate(0,0,0) else cdate({Date Field}))
-Abhilash
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Abhilash,
Thanks for quick response and help.It's working fine.
Regards,
Priyanka.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
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.