time calculation in access

R

rowedf

hello,

I am really having a hard time in access. I do not know how to write
using the sql view so I use design view. I have two time fields
"dispatch time" and "arrival time". I am trying to find out the
elapsed time in minutes. I am trying to use the DateDiff function in
design view but I am getting compile errors..what am I doing wrong or
what other way can i figure this out? Here is what I have currently:

ElapsedMins: DateDiff("n",[Dispatch time],[Arrival Time])

When I run that I get a Compile Error. In query expression
DateDiff("n",[Dispatch time],[Arrival Time])

Thanks for any help.


rowedf
 
J

jmonty

Try this:

ElapsedMins: Format([Dispatch time] - 1 - [Arrival
Time], "n")

jmonty

-----Original Message-----

hello,

I am really having a hard time in access. I do not know how to write
using the sql view so I use design view. I have two time fields
"dispatch time" and "arrival time". I am trying to find out the
elapsed time in minutes. I am trying to use the DateDiff function in
design view but I am getting compile errors..what am I doing wrong or
what other way can i figure this out? Here is what I have currently:

ElapsedMins: DateDiff("n",[Dispatch time],[Arrival Time])

When I run that I get a Compile Error. In query expression
DateDiff("n",[Dispatch time],[Arrival time])

Thanks for any help.


rowedf
---------------------------------------------------------- --------------
----------------------------------------------------------
 
R

rowedf

uh oh...im still seeing some errors...some aren't calculatin
right.....the majority do work fine but there are some that isnt givin
the right result? It seems to be the ones that are exactly 60 minute
elapsed time

rowed
 

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