How do i calculate the difference between columns ( their datatype is DateTime

S

SUDHEER

I need someone help, we have table with 2 columns,

fieldname datatype
----------------------
stime date/time
etime date/time

I want to write a query that can display the stime-
etime.
Help wanted very urgent...
Mail me,if u have any solution to this
(e-mail address removed)
 
A

Allen Browne

You could do it with a calculated field using DMax().

For examle, this assumes you have filtered the query to the etime values,
and you want the number of minutes since the most recent stime:

Minutes: DateDiff("n", [etime], DMax("stime", "MyTable", "stime <= " &
Format([etime]), "\#mm\/dd\/yyyy\#"))
 

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