Question
Issues with Calculated Fields using Dates
Hi all,
I have a calculation in a custom form which outputs the number of days between the start-up date of a project and today's date (essentially the "project age" as of today). Here is the formula I'm using:
FLOOR(DATEDIFF(CLEARTIME($$TODAY),CLEARTIME({plannedStartDate})))
NOTE:
- The "FLOOR" expression should give me a round-down number.
- And the "CLEARTIME" expression should omit the hours in the date/time.
The problem is, I get mixed results with my formula.
Some projects will display the number of days between the planned start date and today's date, as intended. This is displayed as a positive integer:

Some projects will display nothing at all, even though the start date is clearly listed earlier in the form.

Some projects will display a negative number with a decimal point:

Can anyone shed some light on what might be happening?
I have tried various different combinations of formulas (different expressions, changing the reference dates, removing the FLOOR and CLEARTIME expressions) with similar outcomes/results.
Any clues would be helpful.
Thanks
Tom