Hello everyone. I had the following DateDiff work fine in MDB
=DateDiff("d",[Invoice Date],Date()).
Does anyone know how to write the code for the same thing in ADP? I need to
do the above, which calculates the age of an invoice. I also need to be able
to calculate the difference in days between two dates of smalldatetime
format. Thank you in advance for any help.
> Hello everyone. I had the following DateDiff work fine in MDB
> =DateDiff("d",[Invoice Date],Date()).
[quoted text clipped - 5 lines]
> to calculate the difference in days between two dates of smalldatetime
> format. Thank you in advance for any help.
Like this:
DATEDIFF(D,[Invoice Date],CURRENT_TIMESTAMP)

Signature
David Portas, SQL Server MVP
Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.
SQL Server Books Online:
http://msdn2.microsoft.com/library/ms130214(en-US,SQL.90).aspx
--