Skip to Content

Aged from current date

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.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 15, 2016 at 09:49 AM

    Hi Priyanka,

    Try:

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

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 15, 2016 at 01:40 PM

    Hi Abhilash,

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

    Regards,

    Priyanka.

    Add comment
    10|10000 characters needed characters exceeded