Results 1 to 2 of 2
  1. #1
    venu is offline Novice
    Windows XP Access 2002
    Join Date
    Mar 2010
    Posts
    11

    time calculations

    I have a table having hours field. how to give format to this field as HH:MM. I want to enter in this field time period like 01:59 (one hour and fifty nine minutes) and like 25:30(twenty five hours and thirty minutes). i want to add this time period in another field. please help me out. my database in much depend on this time period.

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2010 (version 14.0)
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    DateTime fields are an actual DateTime value and not an "amount" of time. Use two Integer fields for the Hours and Minutes and then you can put them together when needed. You can easily use the Split() function to separate the entered value in the BeforeUpdate event of the control. You could also use a Text (String) field and do the separation in the AfterUpdate event of the control. Regardless of the method, you will need to programatically keep track of the Hours and Minutes separately as Access does not help in this area.

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

Similar Threads

  1. Replies: 4
    Last Post: 01-15-2010, 06:06 AM
  2. subform calculations
    By genesis in forum Forms
    Replies: 0
    Last Post: 12-03-2009, 07:18 PM
  3. Calculations in Access
    By dominick in forum Access
    Replies: 0
    Last Post: 07-28-2009, 07:39 AM
  4. Subform calculations
    By foureyes in forum Forms
    Replies: 4
    Last Post: 07-27-2009, 08:20 AM
  5. Time calculations
    By jimandann in forum Programming
    Replies: 2
    Last Post: 02-18-2009, 12:27 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