Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

Milliseconds in timestamps

Hi everyone,

so, recently I found an information system that records the timestamps down to the millisecond resolution, so i was wondering how on earth would i show this on QV, because clearly the fractional value is being taken into account like this:

=if(Date(41234.999999, 'hh:mm:ss') = Date(41234.99999, 'hh:mm:ss'), 1, 0)

now.... both these dates throw out:    23:59:59

BUT, the if expression evaluates to 0... which means that they are not equal

so,,, 2 questions:

how should I format the times for the milliseconds to show, or how to increase the time resolution for this matters.....

and,,, for the comparison (and possible association of this field...) how should I reformat this date for it to be associated ??

thanks for your time

EDIT:   on second thought, the way QV is making the associations is good, and maybe is just a matter of consolidating the databases' time format in a per case basis. im marking swuehl 's answer as helpful in the meantime as to let anyone with another idea to see the question....

Tags (2)
1 Solution

Accepted Solutions
Highlighted
MVP
MVP

Re: Milliseconds in timestamps

If you want to see milliseconds in your timestamp, use the approproate format code (check out the format code section in the Help file):

=timestamp(41234.999999,'MM/DD/YYYY hh:mm:ss.fff')

2 Replies
Not applicable

Re: Milliseconds in timestamps

ok,,, for the comparison part....

i found a workaround....

=if(Date#(Date(41234.999999, 'hh:mm:ss')) = Date#(Date(41234.99999, 'hh:mm:ss')), 1, 0)

evaluates to 1,,, which means those are equal... at least for the association, that works,,,, but that does not leave me completly satisfied due to the modification of the data......  

what would happen if millisenconds were REALLY important to my client??? grrrr....

c' ya

Highlighted
MVP
MVP

Re: Milliseconds in timestamps

If you want to see milliseconds in your timestamp, use the approproate format code (check out the format code section in the Help file):

=timestamp(41234.999999,'MM/DD/YYYY hh:mm:ss.fff')