Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
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....

1 Solution

Accepted Solutions
swuehl
MVP
MVP

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')

View solution in original post

2 Replies
Not applicable
Author

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

swuehl
MVP
MVP

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')