Results 1 to 3 of 3

Thread: How Do I add Time?

  1. #1

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    10

    Question

    In a Table I have a two time fields one time_in the other Time_out How do I add both and que the result in Hours and minutes, instead of decimal numbers.

  2. #2
    Frenzied Member
    Join Date
    Aug 1999
    Location
    Santa Clara, Ca , 95058
    Posts
    1,105
    Sounds like you might want to look at DateAdd and DateDiff.

  3. #3

    Thread Starter
    New Member
    Join Date
    Apr 2000
    Posts
    10
    Thanks for all the help. dateDiff and dateAdd did not help me in the problem but I sure learned alot from those two commands. the way I did it was a long way. Break the time the hours in minutes and then ad it to the minutes of the hours an then put it back in hours and minutes format.

    for instance:
    Tminutes_in = (Hours_in * 60)+minutes_in
    Tminutes_out =(hours_out *60)+minutes_out

    Totalminutes= Tminutes_out - Tminutes_in
    total_hours = Totalminutes/60
    Total_minutes= totalminutes mod 60
    txtDisplayTime.text = total_hours & ":" & total_minutes

    I hope it helps some one out there

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width