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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

timestamp behaviour

Hi Guys,

I have this sample code

let b = Timestamp(41547.9209375, 'YYYYMMDDhmmss.fff');

SET a='20130930220609.000';

let gdate = num(Timestamp#(a, 'YYYYMMDDhmmss.fff'));

the value of b is 20130930220609.000 which is same as 'a' but when i use timestamp# on a then i get 41547.104270833 in return.

This look weird to me because I am expecting it to be same as  41547.9209375.

Can someone help me the reason for it?

Saurabh

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I think it's because you use only one digit for the hour. Try using hh instead of h:

let gdate = num(Timestamp#(a, 'YYYYMMDDhhmmss.fff'));


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

I think it's because you use only one digit for the hour. Try using hh instead of h:

let gdate = num(Timestamp#(a, 'YYYYMMDDhhmmss.fff'));


talk is cheap, supply exceeds demand
Not applicable
Author

Thanks...it works