Results 1 to 4 of 4
  1. #1
    Join Date
    Feb 2008
    Posts
    3

    Unanswered: Hundredth of seconds in timestamp fields

    It seems that data type "timestamp" in columns on MsAccess table contains more detailed digits than seconds (hundredths of seconds?).
    I cannot find any way to display these extra digits.
    Anybody knows how?
    Normally it is not a problem, but if a "timestamp" column is part of a primary or unique key, it is possible to create what seems to be duplicate because the part less than a second is not visible.
    Anybody knows how to cope with that problem?

    Regards Poul Erik Bjerre

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Hello

    Hi,
    See here for all the formats of :
    dates
    Time
    Timestamp = yyyy-MM-DD HH:mm:ssSS ("capital S" = millisec's )

    http://publib.boulder.ibm.com/infoce...glasm0901.html
    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    nice idea, but here's an immediate window transcript that disagrees with you:

    Code:
    ? format(now(), "HH:NN:SSSSSSS")
    19:49:54545454
    19:49:53535353
    19:49:52525252
    19:49:50505050
    ? format(now(), "HH:NN:SSsssss")
    19:50:11111111
    19:50:0909099
    19:50:0707077
    ? format(now(), "HH:NN:ssSSSSS")
    19:50:31313131
    19:50:30303030
    19:50:29292929
    not fractional seconds - just the same seconds repeated.

    A's timer has one second resolution.
    the apparent finer detail you see is floating-point precision error (A's datetimes are "doubles": days-point-fractionaldays)

    you can get finer resolution time from windows e.g. via GetSystemTime from kernel32 but you will need to store it and manipulate it yourself

    izy
    currently using SS 2008R2

  4. #4
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Re

    By the way think you forgot a simiclon, but if SS dont work then try : f


    ?format(now,"hh:mm:ss:ffff")
    "10:31:32:8750"
    ?format(now,"hh:mm:ss:ffff")
    "10:31:33:1093"
    ?format(now,"hh:mm:ss:ffff")
    "10:31:33:2656"
    ?format(now,"hh:mm:ss:ffff")
    "10:31:33:4531"
    ?format(now,"hh:mm:ss:ffff")
    "10:31:33:6250"
    ?format(now,"hh:mm:ss:ffff")
    "10:31:33:8125"
    ?format(now,"hh:mm:ss:ffff")
    "10:31:33:9843"
    ?format(now,"hh:mm:ss:ffff")
    "10:31:34:1562"
    How's that for quick typing :-)
    Last edited by Marvels; 03-03-08 at 05:38.
    Greetz Marvels -^.^-
    Developments : VB4 Through .Net; Basic; DOS ; CNC ; Sinclair
    Databases : SQL Server Through 2005; Access 3 Through 2003 ; Oracle 8 & 9.i ;
    OS : Win 3.11 Through XP ; NortonComander ; DOS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •