Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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

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

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