Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have a timestamp field within a table. I would like to now get that timestamp field (don't need to change formatting) into a variable to use within a Where clause on another table.
The peek function removes the time piece and rounds up the time which is no good. Need to keep the time as well.
Thanks,
Mark
Thanks Gysbert. Boy - I don't know what was happening earlier, but all is fine. But thank you for your clarification on what I should expect from the peek function and for your time.
I very much doubt peek truncates your timestamp. I've never seen it do that. Try putting this in your script and reload:
T1:
load now(1) as MyTimeStamp
autogenerate 1 ;
LET vMyTime = peek('MyTimeStamp');
Now open the variable editor (ctrl+alt+v) and look at the value of the new variable vMyTime. It should still have the time part.
Are you really sure the timestamp date was stored as a timestamp? Do you dollar-expand the variable?
i.e something like this:
load * from test.qvd (qvd) where MyTimeField > $(vMyTime); //if MyTimeField isn't a timestamp use the timestamp# function on it.
Can you post the qvw document you're working on, or at least the script?
Thanks Gysbert. Boy - I don't know what was happening earlier, but all is fine. But thank you for your clarification on what I should expect from the peek function and for your time.