Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Date field Issue

Hi Friends,I have following table,

table.png

in my QV application I load above table using crosstable as follow

crosstable.png

but when I apply date function on Periods field I am not able to get Date,Month and year from Periods field.. I am not sure is it because of crosstable I used or something else,If anyone has any idea or any suggestion please share with me,its really required..

PFA has sample application and sample xls file

Regards

Bhawna

1 Solution

Accepted Solutions
ashfaq_haseeb
Champion III
Champion III

Hi,

Try like this

tmp:

CrossTable(Periods, Data)

LOAD Project,

     [41640],

     [41671],

     [41699],

     [41730],

     [41760],

     [41791],

     [41821],

     [41852],

     [41883],

     [41913],

     [41944],

     [41974]

FROM

test.xlsx

(ooxml, embedded labels, table is Sheet1);

load *,

date(num#(Periods,'#####')) as date,

month(num#(Periods,'#####')) as month,

year(num#(Periods,'#####')) as year

Resident tmp;

drop table tmp;

Regards

ASHFAQ

View solution in original post

5 Replies
ashfaq_haseeb
Champion III
Champion III

Hi,

Try like this

tmp:

CrossTable(Periods, Data)

LOAD Project,

     [41640],

     [41671],

     [41699],

     [41730],

     [41760],

     [41791],

     [41821],

     [41852],

     [41883],

     [41913],

     [41944],

     [41974]

FROM

test.xlsx

(ooxml, embedded labels, table is Sheet1);

load *,

date(num#(Periods,'#####')) as date,

month(num#(Periods,'#####')) as month,

year(num#(Periods,'#####')) as year

Resident tmp;

drop table tmp;

Regards

ASHFAQ

its_anandrjs

Hi,

Try some thing this way

tmp:

CrossTable(Periods, Data)

LOAD Project,

     [41640],

     [41671],

     [41699],

     [41730],

     [41760],

     [41791],

     [41821],

     [41852],

     [41883],

     [41913],

     [41944],

     [41974]

FROM

test.xlsx

(ooxml, embedded labels, table is Sheet1);

New:

NoConcatenate

load *,

Year( Num#( Periods )) as Year,

MOnth( Num#( Periods )) as Month,

Day( Num#( Periods )) as Day,

MakeDate(Year( Num#( Periods )) , Month( Num#( Periods )) , Day( Num#( Periods ))) as Date

Resident tmp;

Drop table tmp;

Regards,

Anand

Not applicable
Author

thank you...

jyothish8807
Master II
Master II

Hi Bhawana,

PFA

Regards

KC

Best Regards,
KC
ashfaq_haseeb
Champion III
Champion III

Welcome

Regards

ASHFAQ