Is this what you are looking for?
I happened to need this for something else so, since I was looking it up anyways here is the SQL that will give you a difference on the number of days when added to a calculated field.
ex.
DATEDIFF( day , LastCostAdj.Calculated_LastCostAdj , Constants.Today )what they mean
DATEDIFF( Intervalday,month,year, hour, First date , second date )SQL Server DATEDIFF() Function
link to the SQL that will give you all the options.Is this what you did? What error were you getting?