Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

the use of "&" in qliksense script

script :load TX_DATE&WEEKDAY as tx_date,TOTAL_D,WEIGHT_D Resident TableName;

type of TX_DATE  is date while type of WEEKDAY is string.



i expect the reslut of script like "2018/06/01Monday" but the reslut like "43213Monday".


why?

1 Solution

Accepted Solutions
sunny_talwar

Try this

script:

LOAD Date(TX_DATE, 'YYYY/MM/DD') & WEEKDAY as tx_date,

    TOTAL_D,

    WEIGHT_D

Resident TableName;

View solution in original post

7 Replies
sunny_talwar

Try this

script:

LOAD Date(TX_DATE, 'YYYY/MM/DD') & WEEKDAY as tx_date,

    TOTAL_D,

    WEIGHT_D

Resident TableName;

kaanerisen
Creator III
Creator III

Hi Bill,

If you have date in your data, you don't need to concat dayname. You can simply change your date pattern.

LOAD Date(TX_DATE, 'YYYY/MM/DD WWWW') as tx_date,

    TOTAL_D,

    WEIGHT_D

Resident TableName;

'WWWW' in the formet patterns for showing the long name of weekday.

Example:

date(date#('2018/06/01','YYYY/MM/DD'),'YYYY/MM/DD WWWW')

Untitled.png

Hope it helps..

PabloTrevisan
Partner - Creator II
Partner - Creator II

Hi bill,

in cases where & is used, it is interesting to use this syntax by separating the two fields


LOAD Date(TX_DATE,'YYYY/MM/DD') &' - '& WEEKDAY as tx_date


returns : 2018/06/01 - Monday




Anonymous
Not applicable
Author

thks!

Anonymous
Not applicable
Author

thks!

Anonymous
Not applicable
Author

thks too!

petter
Partner - Champion III
Partner - Champion III

Please mark the correct answer as correct to finish off this thread