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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concatenate 2 fields (Text and Date)

Hi,

I would like to concatenate 2 fields in Qlik Sense :

1 field [GAME] which is TEXT format

1 field [GAME DATE]which is DATE format (DD/MM/YYYY)

I tried in the script to do this :

[GAME] &' '&text([GAME DATE]) as [GAME AND DATE]

But I doesn't work.

I get for example FRANCE 41939 instead of FRANCE 27/10/2014.

Do you known how could I get the correct result ?

Thank you for your help

Sincerely

1 Solution

Accepted Solutions
marcus_sommer
MVP
MVP

Try:

[GAME] & ' ' & date([GAME DATE], 'DD/MM/YYYY') as [GAME AND DATE]

- Marcus

View solution in original post

4 Replies
marcus_sommer
MVP
MVP

Try:

[GAME] & ' ' & date([GAME DATE], 'DD/MM/YYYY') as [GAME AND DATE]

- Marcus

swuehl
Champion III
Champion III

Try

[GAME] &' '& Date([GAME DATE],'DD/MM/YYYY') as [GAME AND DATE]


or


[GAME] &' '&text(Date([GAME DATE],'DD/MM/YYYY ')) as [GAME AND DATE]

sunny_talwar
MVP
MVP

Don't use the text function here.... this should work:

[GAME] & ' ' & [GAME DATE] as [GAME AND DATE] or

[GAME] & ' ' & Date([GAME DATE]) as [GAME AND DATE]


Once you concatenate a non text field with a text field, it automatically converts into a text field.


EDIT: First one seemed to work:


Table:

LOAD *,

  GAME & ' ' & [GAME DATE] as [GAME AND DATE];

LOAD * Inline [

GAME, GAME DATE

FRANCE, 27/10/2014

];


Capture.PNG


Best,

Sunny

Not applicable
Author

Thank you,

This script works :

[GAME] & ' ' & date([GAME DATE], 'DD/MM/YYYY') as [GAME AND DATE]

Best

Julien