Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / SQL Server / ADP / March 2006

Tip: Looking for answers? Try searching our database.

Age calculation

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Greg Snidow - 27 Mar 2006 21:15 GMT
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.
David Portas - 27 Mar 2006 22:13 GMT
> 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
--

 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.