Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys
I have a simple testing code
let cdate = Timestamp('41541.7729050926');
// cdate is 2013-09-24 18:32:59
let gdate = Timestamp#(cdate);
I am expecting gdate to be '41541.7729050926' but it just same as cdate i.e. 2013-09-24 18:32:59.
what wrong am i doing here?
Saurabh
First, you need to use a number as argument to Timestamp(), not a string,
let cdate = Timestamp('41541.7729050926');
won't assign anything to cdate, use
let cdate = Timestamp( 41541.7729050926 );
Then, Timestamp#() is interpreting a string and setting the numeric representation, but it will return the text representation in this context (and the variable will only hold the text representation, no dual value).
You'll need to use num() function to get the numeric representation:
let gdate = num(Timestamp#(cdate));
Please have a look also into http://community.qlik.com/docs/DOC-3102
First, you need to use a number as argument to Timestamp(), not a string,
let cdate = Timestamp('41541.7729050926');
won't assign anything to cdate, use
let cdate = Timestamp( 41541.7729050926 );
Then, Timestamp#() is interpreting a string and setting the numeric representation, but it will return the text representation in this context (and the variable will only hold the text representation, no dual value).
You'll need to use num() function to get the numeric representation:
let gdate = num(Timestamp#(cdate));
Please have a look also into http://community.qlik.com/docs/DOC-3102
Thanks...
It works...
let gdate = num#(Timestamp#(Timestamp('41541.7729050926')));