Topic
  • 1 reply
  • Latest Post - ‏2010-08-05T17:30:56Z by Vijayanath
SystemAdmin
SystemAdmin
2105 Posts

Pinned topic CurrentTimestamp Function and Microseconds

‏2004-03-02T16:48:31Z |
From what testing I've done I don't see that the CurrentTimestamp function (PX) returns the micro seconds. Can anyone verify this or tell me how to get the micro seconds? I've tried peeking dummy data, just generating dumb rows and appending a column with CurrentTimestamp() function in the derivation. I've tried TimestampToString(CurrentTimestamp(),"%yyyy-%mm-%dd %hh:%nn:%ss.6") writing to a varChar field and tried MicroSecondsFromTime(CurrentTime()) to get just the micro seconds and recieved the following back:

Peek_2,0: myTimeStamp:2004-03-02 16:28:26.000000 microSec:0 dummy:a
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:b
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:c
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:d
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:e
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:f
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:g
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:h
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:i
Peek_2,0: myTimeStamp:2004-03-02 16:28:26.%s8697 microSec:0 dummy:j
Thanks,

Myles
Updated on 2010-08-05T17:30:56Z at 2010-08-05T17:30:56Z by Vijayanath
  • Vijayanath
    Vijayanath
    1 Post

    Re: CurrentTimestamp Function and Microseconds

    ‏2010-08-05T17:30:56Z  
    Try using CurrentTimestampMS()

    Output will look like
    2010-08-05 13:29:09.970000