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 / New Users / January 2005

Tip: Looking for answers? Try searching our database.

How do I get the difference between two dates that are entered on.

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
mwdmanjg - 05 Jan 2005 18:32 GMT
I have two date inputs on a form and i need to calculate the difference
between the two dates and display it on the same form.  I have a code, but
don't know where to put it and have it display the result on the form.  
Thanks in advance.
John Vinson - 05 Jan 2005 20:44 GMT
>I have two date inputs on a form and i need to calculate the difference
>between the two dates and display it on the same form.  I have a code, but
>don't know where to put it and have it display the result on the form.  
>Thanks in advance.

Put a textbox on the FOrm and set its Control Source property to

=DateDiff("d", [FirstDate], [SecondDate])

to get the difference in days. DateDiff will give you a choice of any
unit from seconds to years - see the online help for details.

                 John W. Vinson[MVP]
 
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.