Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

TIMESTAMP is not working

I am loading date from QVD which is holding a single value . Below is the script that i am using

abc :

LOAD MaxUpdatedDate

FROM

(qvd);

let p=FieldValue('MaxUpdatedDate',1); // It is coming fine

LET vMyVariable  = TIMESTAMP(FieldValue('MaxUpdatedDate',1),'DD-MMM-YYYY hh:mm:ss.fff'); // having issue with this

I am not able to see vMyVariable on screen . Please help me

10 Replies
YoussefBelloum
Champion
Champion

Hi,

what is the format of your MaxUpdatedDate field ?

jonvitale
Creator III
Creator III

If you use the debugger in the load script and place a breakpoint after the LET vMyVariable statement, what do you wee there?

Anonymous
Not applicable
Author

Hi ,

This is the format  "19-Mar-2018 17:47:41.933"

Anonymous
Not applicable
Author

Hi ,

vMyVariable <NULL>

YoussefBelloum
Champion
Champion

so here you just want to get the minimum timestamp value loaded on the abc table ?

Anonymous
Not applicable
Author

i want max value . Also below code is not working

abc :

LOAD

max(MaxUpdatedDate)

FROM

(qvd);

max  function is not working too

vishsaggi
Champion III
Champion III

Try this? And FieldValue() Function works only on Distinct values of the Field.

LET vMyVariable  = TIMESTAMP(TIMESTAMP#(FieldValue('MaxUpdatedDate',1),'DD-MMM-YYYY hh:mm:ss.fff'));

YoussefBelloum
Champion
Champion

EDITED

try this code:

abc :

LOAD Timestamp(Timestamp#(MaxUpdatedDate,'DD-MMM-YYYY hh:mm:ss.fff''),'DD-MMM-YYYY hh:mm:ss.fff') as MaxUpdatedDate

FROM

(qvd);

LET vMyVariable = Peek('MaxUpdatedDate',0, 'abc');

TRACE $(vMyVariable );

LET ME KNOW

Anonymous
Not applicable
Author

hi ,

Its working now . Thanks a ton