QV12 Timestamp Parsing

Have you noticed something new in QlikView12 and Qlik Sense timestamp parsing? UTC timestamps are automatically understood.

(Note: the output displayed below utilizes the US Date format set in the script as:  SET TimestampFormat=’M/D/YYYY h:mm:ss[.fff] TT’;)

For example, the expression:

=Timestamp('20160504T142523.487-0500')

returns:

5/4/2016 7:25:23 PM

That is, the UTC offset of “-0500” is detected and the returned value is the UTC time, not the local time of 2:25:23 PM.

I can’t find anything in the help beyond an example  for Timestamp# that demonstrates this but provides no detail.

This parsing functionality is particularly useful now that the QlikView Server logfiles use the UTC format for times.

I’m not sure yet if I like the automatic conversion to UTC time.  For example, apps like the QlikView Governance Dashboard now report Session Start or Event times in UTC time, not local time.

It’s nice that the “T” character is understood. If you want local time, it’s easy enough to drop the offset (“-0500”) as

=Timestamp(left('20160504T142523.487-0500', 19))

which returns

5/4/2016 2:25:23 PM

-Rob

 

Share

4 thoughts on “QV12 Timestamp Parsing”

  1. Hi I have noticed that the timestamp in the log files are now of a format of 20171124T042959.855+0000 however the governance dashboard does not pick up these files and doesnt appear to recognise the format – can you advise?

  2. I believe the latest version of governance dashboard is supposed to process these correctly. I would check this out with QT support.

  3. In Qlik Sense September 2017 release…I tried this within a text box: Timestamp( NOW(),’M/D/YYYY h:mm:ss[.fff] TT’)

    Unfortunately this yielded: 12/16/2017 4:16:54 PM

    No timezone on it 🙁

Leave a Reply

Your email address will not be published. Required fields are marked *