If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Time function

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 05-18-03, 03:52
mdasif mdasif is offline
Registered User
 
Join Date: Oct 2002
Posts: 12
Question Time function

I have two time variable : time_in and time_out. ineed to get the difference of these two time and add the resulting time difference and sum it up.
can somebody tell me how do get the difference between time_in and time_out and the summation of the differencce time variable in hours minutes and seconds.
thank you,
asif
Reply With Quote
  #2 (permalink)  
Old 05-19-03, 05:48
garethdart garethdart is offline
Registered User
 
Join Date: Sep 2002
Location: South Wales
Posts: 580
DateDiff

Try

Duration=datediff("n",[Time_Out], [Time_In])

...Gives diference in minuites ("n")

Look up DateDiff on microsoft knowledgebase

http://msdn.microsoft.com
Reply With Quote
  #3 (permalink)  
Old 05-19-03, 06:21
ansentry ansentry is offline
Registered User
 
Join Date: Aug 2002
Location: Melbourne, Australia
Posts: 111
Talking Date Difference

Have a look at the attachment, just open the form and look at the examples (24 hour clock). However if you enter say start time 7:00 AM - it will show 07:00 then if you enter endtime 7:00 PM it will show 19:00

If you open the query you will see how it works.



NOT MY IDEAN, JUST SOMETHINK I PICKED UP IN MY WEB TRAVELS.


Hope this was some help
Attached Files
File Type: zip time_diff.zip (26.0 KB, 40 views)
__________________
Regards,



John A
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On