Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Announcements
Qlik® Product Spotlight: Discover what’s possible. Get more from our products.
See for yourself. Register today.
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
MVP & Luminary
MVP & Luminary

Re: Concatenate 2 fields (Text and Date)

Try:

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

- Marcus

4 Replies
MVP & Luminary
MVP & Luminary

Re: Concatenate 2 fields (Text and Date)

Try:

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

- Marcus

MVP
MVP

Re: Concatenate 2 fields (Text and Date)

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]

Re: Concatenate 2 fields (Text and Date)

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

Re: Concatenate 2 fields (Text and Date)

Thank you,

This script works :

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

Best

Julien

Community Browser