Calculated Field to return 0 when date not entered

Hi,

I have created a calculated field to forecast the expected date to reach the next stage of construction, using the completion date of the previous stage + agreed days.  Below works as expected:

addDays($stage_completed_date_c,$build_stage_days_c)

Except when the ($stage_completed_date_c) hasn't been entered yet, the result returns as 30/11/-0001

How can I get the result to show empty or 0?

  • Hi Cheryl,

    I was unable to reproduce in my 10.0.1 Enterprise instance. Here is what I did:

    1. I created a date type field in Accounts: $stage_completed_date_c

    2. I created an Integer type field in Accounts: $build_stage_days_c

    3. I created a date type field which I calculated with: addDays($stage_completed_date_c,$build_stage_days_c)

    4. I added all three of these fields to the Accounts RecordView layout.

    5. I put an integer in $build_stage_days_c

    6. I kept $stage_completed_date_c empty

    Result: The calculated date field remained empty both before and after save

    Reading through these steps, do you recognize anything I did differently than you? Are your three field types different, for example?