Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
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

Try:

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

- Marcus

View solution in original post

4 Replies
marcus_sommer

Try:

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

- Marcus

swuehl
MVP
MVP

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

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