Results 1 to 3 of 3
  1. #1
    OscarCat is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Pakenham, Victoria, Australia
    Posts
    2

    How do I store a period of time


    How do I enter and store a period of time that may be of any length: years (.. unlikely but ...), days, hours, minutes, seconds (or even micro seconds) that I can later add to other dates or times stored in my database? How do I create a sensible data entry mask for yyyy/ddd/hh:nn:ss.999 and then convert this to a field compatible with date/time functions? And what format should this data take (be converted to ..?) and be stored in?
    Or is this all somewhere sensible in a manual I don't have?

    Any assistance appreciated.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    Options I see:
    1. Store each time part in its own field. Then when you do calcs will have to convert each part to a common unit, such as days. Complication with this is that years don't all have the same number of days, this will have to be accounted for in the conversion.

    2. Store single value as number of decimal days.
    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.

  3. #3
    OscarCat is offline Novice
    Windows XP Access 2007
    Join Date
    Jun 2012
    Location
    Pakenham, Victoria, Australia
    Posts
    2
    Thanks Super.

    Painful. But I thought that might be the case.

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

Similar Threads

  1. Replies: 1
    Last Post: 04-25-2012, 12:36 PM
  2. How can i know existing period
    By waqas in forum Forms
    Replies: 1
    Last Post: 09-19-2011, 11:36 AM
  3. Count records between Time Period
    By turnbuk in forum Queries
    Replies: 1
    Last Post: 08-10-2011, 10:06 AM
  4. Set Database to Expire in time period
    By robsworld78 in forum Access
    Replies: 12
    Last Post: 06-07-2011, 06:54 AM
  5. Count Items by Time Period
    By pawslover in forum Queries
    Replies: 1
    Last Post: 11-15-2010, 03:57 PM

Tags for this Thread

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