I was able to get it working by the following:
First column: "Required Closure Date"
This is a "Date and Time" column with its data entry in "Date and Time" so we can test rounding ("Date Only" will always default to 12:00, resulting in the rounding to be inaccurate).
Second column: "Days Until Due"
Calculated column with the formula of: =[Required Closure Date]-[Modified]
Data returned type is "Single line of text".
Testing this now will produce numerical values with several decimal places due to how the "DateTime" object is serialized.
Examples:
Title: "Test 1"
Required Closure Date: 11/27/2008 11:00 PM
Modified: 11/25/2008 8:46 AM
Days Until Due: 2.59275463
Title: "Test 2"
Required Closure Date: 12/16/2008 9:30 AM
Modified: 11/25/2008 8:56 AM
Days Until Due: 21.023298611
Now, since we want it to be in whole numbers and round down to the nearest number (a simple "Round" operation would round up anything over .5 giving us the appearance of an extra day), we can use the "ROUNDDOWN()" function as you mentioned, to do this for us.
The "ROUNDDOWN()" function uses the format of:
=ROUNDDOWN("Number to round down", "Number of decimal places")
(Note the second half of the formula? I think this where you got the error from - you forgot to tell it how many decimal places to use)
So, modify the "Days Until Due" formula to be: =ROUNDDOWN(([Required Closure Date]-Modified),0).
After saving, the results should be updated into whole numbers rounded down to the nearest integer.
Title: "Test 1"
Required Closure Date: 11/27/2008 11:00 PM
Modified: 11/25/2008 8:46 AM
Days Until Due: 2
Title: "Test 2"
Required Closure Date: 12/16/2008 9:30 AM
Modified: 11/25/2008 8:56 AM
Days Until Due: 21
Let me know how it works for you.
- Dessie