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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

null coming in script

Hi All,

I had written script and null value is coming for variable. But that variable is having some value.

Inserts:

LOAD *FROM

$(Vqvdpath)fact_site_visit.QVD (qvd);

MaxDates:

LOAD Max(site_visit_updated_datetime) as MaxDate

Resident Inserts;

LET vMaxDate = Peek('MaxDate',0,'MaxDates');

DROP TABLE MaxDates;


In above for vMaxDate  null value is coming. But it is having max value. Where it is wrong. I think my script is correct. Can anyone tell me where it is going please guide me

11 Replies
HirisH_V7
Master
Master

Hi,

Check with this,

Temp:

LOAD * INLINE [

    ShipDate

    09/01/2014 08:19:20

    10/01/2014 08:19:22

    11/02/2014 08:12:20

];

Data:

LOAD

  TimeStamp(Min(TimeStamp#(ShipDate,'DD/MM/YYYY h:mm:ss')),'DD/MM/YYYY h:mm:ss')as MinDate,

  TimeStamp(Max(TimeStamp#(ShipDate,'DD/MM/YYYY h:mm:ss')),'DD/MM/YYYY h:mm:ss')as MaxDate

Resident Temp;

Drop Table Temp;

LET vMinDate = floor(peek('MinDate'));

LET vMaxDate = floor(peek('MaxDate'));

Output:

Max Date Load-203358.PNG

Check this too in your app,

SET TimeFormat='h:mm:ss TT';

SET DateFormat='DD/MM/YYYY';

SET TimestampFormat='DD/MM/YYYY h:mm:ss[.fff] TT';

AND MODIFY Accordingly

And Modify Accordingly,

Hope this helps,

PFA,

Hirish

HirisH
markodonovan
Specialist
Specialist

Hi Kumar,

You can also hover over the field in the tableviewer to see if qlikview has recognized the field as a $date\$timestamp with the tags it gives the fields.

Thanks

Mark

http://techstuffybooks.com