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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
kevinpintokpa
Creator II
Creator II

How to parse 20180619075546.0Z using TimeStamp# function

So I have a string (returned by an Active Directory utility) that looks like this: 20180619075546.0Z

I have tried all manner of format strings with the TimeStamp# function but it simply doesn't work.  None of these work, for instance:

Timestamp# ( modifyTimeStamp, 'YYYYMMDDhhmmss.0Z' ) returns 20180619075546.0Z

Timestamp# ( modifyTimeStamp, 'YYYYMMDDhhmmss' ) returns 20180619075546.0Z

Timestamp# ( Left ( modifyTimeStamp, 14  ), 'YYYYMMDDhhmmss' ) returns 20180619075546

Date# ( Left ( modifyTimeStamp, 8  ), 'YYYYMMDD' ) returns 20180619

What I am doing wrong?

Labels (1)
1 Solution

Accepted Solutions
kevinpintokpa
Creator II
Creator II
Author

I found that I had to:

a) Trim off any extraneous characters

b) Wrap the expression in another Timestamp function.

So this finally works:

Timestamp ( Timestamp# ( Left ( modifyTimeStamp, 14  ), 'YYYYMMDDhhmmss' ) )

 

and it properly returns 6/19/2018 7:55:46 AM as desired.

View solution in original post

1 Reply
kevinpintokpa
Creator II
Creator II
Author

I found that I had to:

a) Trim off any extraneous characters

b) Wrap the expression in another Timestamp function.

So this finally works:

Timestamp ( Timestamp# ( Left ( modifyTimeStamp, 14  ), 'YYYYMMDDhhmmss' ) )

 

and it properly returns 6/19/2018 7:55:46 AM as desired.