Results 1 to 3 of 3
  1. #1
    Join Date
    Jan 2009
    Posts
    1

    Time calculations

    Is there a way I can enter a one to three digit number, have it appear as a three digit number, but have it stored in short time (nn:ss). For instance, in a form or table, I want to enter the number 135 and have it displayed as 135. However, I want the number stored as 02:15, meaning that the 135 is one hundred and thirty five seconds. This then gets stored as 2 minutes 15 seconds. I plan to use the stored 02:15 in a later time calculation.

    Thanks.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    I find that this link helps to understand the DateTime DataType a little better: http://support.microsoft.com/default.aspx/kb/q130514/

  3. #3
    thhui is offline Competent Performer
    Windows XP Access 2002 (version 10.0)
    Join Date
    Feb 2009
    Posts
    235
    Define a function to hold the min:sec variables

    Function time_M(a)
    mm = a \ 60
    ss = a Mod 60
    time_M = TimeSerial(0, mm, ss)
    End Function

    Then you can use a, or time_M(a) freely.

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

Similar Threads

  1. Calculations in linked forms
    By Dena Grabinar in forum Forms
    Replies: 0
    Last Post: 08-22-2008, 05:34 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