Results 1 to 2 of 2
  1. #1
    Hswift is offline Novice
    Windows 8 Access 2013
    Join Date
    Dec 2015
    Posts
    20

    Can access recognize fractions of a second?

    Hello,



    I have a .CSV file on my computer (that I have not imported into Access yet) with data that is structured like this:

    h,m,s,ms
    21,36,11,146
    21,55,38,012
    22,45,27,884

    Here is what the column header stands for
    h=hour
    m= minute
    s= second
    ms= millisecond (which is 1/1,000 of a second)

    Is there a way to import this data into Access so that Access understands the "ms" column is 1/1000th of a second?

    I need Access to understand what the "ms" column is because I will be subtracting from this "ms" column, which could lower the "s" column. For example, the rows mention above would need to appear as follows if i subtracted 20 from the "ms" column (notice that this lowers the middle row's "s" column from 38 to 37).

    21,36,11,126
    21,55,37,992
    22,45,27,864


    Thanks!

  2. #2
    ItsMe's Avatar
    ItsMe is offline Sometimes Helpful
    Windows 8 Access 2013
    Join Date
    Aug 2013
    Posts
    7,862
    The short answer is, no. The .NET framework offers classes to manage timespans and dates with milliseconds. However, Access does not. You can get a Date by using a sum of milliseconds. However, a date and adding seconds to milliseconds are two different things.
    https://support.microsoft.com/en-us/kb/210276

    Why not just use integers to get a sum of milliseconds and then cast the result to a text string? You can grab the characters to the left of the text string and place them into your Seconds element. The three characters on the right will be your milliseconds.
    https://msdn.microsoft.com/en-us/lib.../gg251556.aspx

    You could use the split function to analyze the various elements of your h,m,s,ms thing. Maybe place the result into a table or a collection or a dictionary or ...
    https://msdn.microsoft.com/en-us/lib.../gg278528.aspx

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

Similar Threads

  1. Replies: 4
    Last Post: 05-22-2015, 02:29 AM
  2. Totalhours to Fractions
    By desireemm1 in forum Access
    Replies: 1
    Last Post: 10-27-2014, 01:04 PM
  3. access database engine does not recognize
    By slimjen in forum Forms
    Replies: 8
    Last Post: 05-30-2014, 11:53 AM
  4. Access 2010 does not recognize....
    By TinaCa in forum Access
    Replies: 9
    Last Post: 01-30-2012, 06:37 AM
  5. Access does not recognize field
    By Shingo in forum Reports
    Replies: 0
    Last Post: 06-25-2009, 09:17 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