Results 1 to 3 of 3
  1. #1
    WCR is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Location
    phoenix
    Posts
    2

    Question time equation in form

    I am trying to subtract two time period fields in my form so that the correct total amount of time will be placed into the total hours missed field.

    Example: current Control Source entry is = End Time - Start Time

    End time field entry 21:00 , Start time field 20:30 , Total Missed field 30
    this works OK for any time before midnight but when I try to use the following


    time - End Time 2:15 and Start Time 00:00 the answer comes out wrong in the Total missed time field . It should be 2.15 hours but it comes out a much larger number. What change do I need to make in my Control Source to compensate for going past midnight. Any suggestions? Thanks

  2. #2
    pbaldy's Avatar
    pbaldy is offline Who is John Galt?
    Windows XP Access 2007
    Join Date
    Feb 2010
    Location
    Nevada, USA
    Posts
    22,521
    The most reliable method would be to store the date with the time. You can also use things like this:

    http://www.mvps.org/access/datetime/date0004.htm
    Paul (wino moderator)
    MS Access MVP 2007-2019
    www.BaldyWeb.com

  3. #3
    WCR is offline Novice
    Windows XP Access 2003
    Join Date
    Sep 2010
    Location
    phoenix
    Posts
    2

    time equation in form

    I used the format([start time]-1-[end time],"Short Time" and that worked great in my form. But when I went to my Table data sheet the calculation wasn't recording correctly. Any suggestions. Thanks much.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 1
    Last Post: 07-14-2010, 11:55 PM
  2. Date/Time entry field on a form
    By Ted C in forum Forms
    Replies: 1
    Last Post: 06-22-2010, 12:28 PM
  3. How To Create A 'One Time Use' Form
    By dr_destructo in forum Forms
    Replies: 6
    Last Post: 04-08-2010, 08:02 AM
  4. Storing an Equation in Table
    By tmedler in forum Programming
    Replies: 0
    Last Post: 03-09-2009, 09:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums