Results 1 to 4 of 4
  1. #1
    tigdupre is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Location
    Port Orchard, WA
    Posts
    2

    Programming and calculating a single field with "HOURS:MINUTES:SECONDS"

    I'm working on a fairly simple database to keep records of video-taped interviews with soldiers returning from deployment--"Lessons Learned" type of thing. One of the problems I'm having is being able to record an elapsed time of the video in a field as HH:MM:SS, then being able to calculate the total elapsed time for all the interview records in a specific series.

    If INTERVIEW_01 is 00:30:30 in length, and
    INTERVIEW_02 is 00:29:30 in length, then I want the total to read
    TOTAL 01:00:00

    First problem: How can I get the field to display "__:__:__" with two spaces on either side of the colons, requiring a numeric entry.

    Second problem: How to perform a calculation on that field to output the total elapsed time in a report?

    I am almost completely self-taught when it comes to using MS-ACCESS, and have very little programming experience. I understand the logic behind programming, and can use some formatting and concatenation techniques to get the information I want, but this little problem is out of my league.



    Much appreciation in advance for any and all help!

    Tig Dupre
    Fort Lewis, WA

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 64bit Access 2013
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Just a thought but the DateTime field is for recording an exact Date and Time. For elapsed time I would probably use a Long Integer and save the seconds of elapsed time. Adding them would be easier and showing each one as hour:minute:seconds could be accomplished with a User Defined Function.

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,632
    Elapsed time should be stored as a double number for calculation purposes. See post 9 in https://www.accessforums.net/access/...ime-38266.html

    If stored as text in hh:mm:ss structure will need to convert to double number for calculations.
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

  4. #4
    tigdupre is offline Novice
    Windows 7 32bit Access 2007
    Join Date
    May 2014
    Location
    Port Orchard, WA
    Posts
    2
    RG and June7, Many thanks for your prompt replies. I'll continue to work on the problem. One thing I am is patient!

    Thanks again,

    Tig Dupre

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

Similar Threads

  1. Replies: 30
    Last Post: 09-27-2013, 01:34 PM
  2. Replies: 7
    Last Post: 06-27-2013, 10:56 AM
  3. Replies: 4
    Last Post: 06-12-2013, 10:20 AM
  4. Replies: 3
    Last Post: 04-22-2013, 06:08 AM
  5. Replies: 16
    Last Post: 07-22-2011, 09:23 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