Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Timestamp field

I have the below string as my timestamp when pulled in QV from an SAP system

20111103145103

How can I make this into a meaningful date?

I have used the following but to no avail - date(date#(Timestamp,'DDMMYYY'))

Thanks

1 Solution

Accepted Solutions
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You are on the right track, but the format string in the date# function must match the data exactly. Assuming the remaining digits represent the time (and I think the date is in YYYYMMDD format):

     date(date#(Timestamp, 'YYYYMMDDhhmmss'))

Although this displays the date only, the time part is still part of the value (date() only formats, it does not truncate)

If you want to discard the time part, use:

     date(floor(date#(Timestamp, 'YYYYMMDDhhmmss')))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein

View solution in original post

1 Reply
jonathandienst
Partner - Champion III
Partner - Champion III

Hi

You are on the right track, but the format string in the date# function must match the data exactly. Assuming the remaining digits represent the time (and I think the date is in YYYYMMDD format):

     date(date#(Timestamp, 'YYYYMMDDhhmmss'))

Although this displays the date only, the time part is still part of the value (date() only formats, it does not truncate)

If you want to discard the time part, use:

     date(floor(date#(Timestamp, 'YYYYMMDDhhmmss')))

Hope that helps

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein