Results 1 to 3 of 3
  1. #1
    ccordner is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    65

    Times greater than 24 hours

    Good Afternoon

    I am using a database and need a field capable of storing times that will be greater than 24 hours.

    I understand there is no "ready made" way of dealing with this in Access, so what's the best way?



    The catch is I am using VBA code in Excel to populate the table, the value comes from a cell (in Excel formatted as "[h]:mm").

    Any ideas?

    Thanks
    Chris

  2. #2
    John_G is offline VIP
    Windows XP Access 2003
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Hi -

    Access has no data type that stores "amount" of time. You have two choices. First is to store the starting point and ending point of the time interval, and calculate the difference when you need it.

    If you really need to store "amount" of time greater than 24 hours, then you will need to use a normal numeric field. Whether you use hh.mm (e.g. 9.15 would be 9 hours, 15 minutes) or decimal hours (e.g .9.25 hours is also 9 hours 15 minutes) is up to you, but you cannot easily do calculations with the former method.

    You could always write a function to display 9.25 hours as 9:15 when you need to.

    HTH
    John

  3. #3
    ccordner is offline Advanced Beginner
    Windows XP Access 2007
    Join Date
    Nov 2011
    Posts
    65
    Thanks

    I think you're right about storing it as 9.25 hours. Probably easier in the long run.

    Chris

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

Similar Threads

  1. Replies: 5
    Last Post: 06-13-2011, 01:30 PM
  2. Greater than or equal to date
    By stryder09 in forum Access
    Replies: 1
    Last Post: 04-14-2011, 03:54 PM
  3. Joins to get records greater than
    By thart21 in forum Queries
    Replies: 10
    Last Post: 09-15-2010, 08:45 AM
  4. Greater than date
    By I-am-me in forum Queries
    Replies: 1
    Last Post: 08-18-2009, 05:21 AM
  5. Replies: 0
    Last Post: 04-03-2009, 01:15 PM

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