
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Including tenths/hundredths of second in Time
Looked at all references to Time and Time# and could only find 'hh:mm:ss tt' documented. Excel provides for tenths, hundredths, etc. of a second (e.g. "mm:ss.0"). When I do the same with Qlik only those values having zero tenths get converted (as if the zero were a filter!?).
Any suggestions (or workarounds) on how to accomplish displaying tenths/hundredths of a second. This time precision is important in my application and life would be easier to keep the field as time rather than (say) convert the field to # of tenths of a second and figure out how to reconstruct a display field.
My application compares event times and yes tenths (and in some cases hundredths) of a second are important.
Help Time gurus! (Thanks in advance.)
Accepted Solutions

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure if this would help, but may be this:
Time(TimeField, 'hh:mm:ss ttt') // with one extra t
Time(TimeField, 'hh:mm:ss.ffff')
May be you have already tried it and did not work, but I thought it might help to add that there

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Not sure if this would help, but may be this:
Time(TimeField, 'hh:mm:ss ttt') // with one extra t
Time(TimeField, 'hh:mm:ss.ffff')
May be you have already tried it and did not work, but I thought it might help to add that there


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
As Sunny said, using the correct format code should enable interpreting a timstamp including up to milliseconds.
How do your input records look like? Could you post some samples of that timestamp?


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
I don't find any issues with the default interpretation of time values including tenth, hundreds or thousandth of a second:
SET TimeFormat='hh:mm:ss';
tabTimes:
LOAD *,
Text(yourtime) as yourtimetxt,
Time#(yourtime, 'hh:mm:ss') as yourtime2,
Time#(yourtime, 'hh:mm:ss.fff') as yourtime3,
Time#(yourtime, 'hh:mm:ss[.fff]') as yourtime4
Inline [
yourtime
12:34:56
12:34:56.0
12:34:56.1
12:34:56.2
12:34:56.11
12:34:56.12
12:34:56.111
12:34:56.112
];
Like Stefan already asked for, please share a sample of your data to test with.
thanks
regards
Marco


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
loading from excel you might have to use a format like
Time(yourtime, 'hh:mm:ss.fff')
SET TimeFormat='hh:mm:ss';
tabTimes:
LOAD A as yourtime,
Text(A) as yourtimetxt,
Time(A, 'hh:mm:ss') as yourtime2,
Time(A, 'hh:mm:ss.fff') as yourtime3,
Time(A, 'hh:mm:ss[.fff]') as yourtime4
FROM [..\Daten\QlikView\QlikCommunity\QlikCommunity_Thread_191833.xlsx] (ooxml, no labels, table is Tabelle1);
hope this helps
regards
Marco


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
'f' is the format code for fractions of a second. 'fff' would be thousands.
I do see it in the Help under "Format Codes"
- To describe the fractions of a second, use the symbol "f" for each digit.
-Rob


- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, need to get my eyes checked. I swear that 't' and 'f' looked identical on the small screen yesterday.

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I did not realize that I was typing ttt instead of fff

- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks to the community, marked as correct the first response of many!
Never in my wildest dreams did I think the community would tell me to '.f'' it -- and that I'd thank them for it ;^) (hopefully the humor isn't too off-color for the forum; apologies in advance if it is)
