Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

vireshkolagimat
Contributor III

read header date field as is in source

Hi team,

I am loading the below data from excel sheet but i have the dates in header column.

After reloading the header column is stored as number. How to store it as date format as is in excel.

  

12/9/201512/13/2015
100134
200654
300754
400333

Regards,

Viresh

4 Replies

Re: read header date field as is in source

Try CrossTable() Load: The Crosstable Load

Re: read header date field as is in source

May be try like this, if you want the header as Date.. (May be there is a good suggestion)

SET DateFormat='M/D/YYYY';

Directory;

T1:

LOAD Num(A) as A,

     Num(B) as B

FROM

[..\Book1.xlsx]

(ooxml, no labels, table is Sheet1);

Let vHeader1=Date(Peek('A',0,'T1'));

Let vHeader2=Date(Peek('B',0,'T1'));

NoConcatenate

T2:

LOAD A as '$(vHeader1)',

  B as '$(vHeader2)'

  

Resident T1 Where RecNo()>1;

DROP Table T1;

Capture.JPG

Re: read header date field as is in source

After crosstable loading the table you could join with a resident load having a newly created field

Date(yourcrosstabledatefield) as NewDate

Hope this helps

Regards

Marco Wedel

qlikview979
Valued Contributor

Re: read header date field as is in source

Hi,

I am Not getting correct, can you try once with my source file.

Regards,

Mahesh.