calculating time fields

M

Mike R.

I have used another database program for many years but
am new to Access. I need help with expression and syntax
as to how to calculate the difference in two date/time
fields. I want to know total time, ie., endtime -
begintime.

thanx
 
R

Rebecca Riordan

You want the DateDiff function. The syntax details are in on-line help.

HTH

--
Rebecca Riordan, MVP

Designing Relational Database Systems
Microsoft SQL Server 2000 Programming Step by Step
Microsoft ADO.NET Step by Step

http://www.microsoft.com/mspress

Blessed are they who can laugh at themselves,
for they shall never cease to be amused...
 
J

John Vinson

I have used another database program for many years but
am new to Access. I need help with expression and syntax
as to how to calculate the difference in two date/time
fields. I want to know total time, ie., endtime -
begintime.

Open the VBA editor by typing Ctrl-G (in order to bring up the proper
Help file) and search for help on "DateDiff" - it does just this. For
example,

TotTime: DateDiff("n", [begintime], [endtime])

will give a long integer number of minutes between the two times.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top