Skip to Content
0

Aged from current date

Nov 15, 2016 at 06:49 AM

54

avatar image

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.

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
Abhilash Kumar
Nov 15, 2016 at 09:49 AM
0

Hi Priyanka,

Try:

CurrentDate - (If {Date Field} = '#' then cdate(0,0,0) else cdate({Date Field}))

-Abhilash

Share
10 |10000 characters needed characters left characters exceeded
Priyanka Choudam Nov 15, 2016 at 01:40 PM
0

Hi Abhilash,

Thanks for quick response and help.It's working fine.

Regards,

Priyanka.

Share
10 |10000 characters needed characters left characters exceeded