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

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Concat string

Hello,

I want to concatenate two string which are the month and the year of a date named DateFacture, which is a field in my table, to obtain other field, I tried this with two methods but I have always an error!

for example: dateFacture=01/02/2014 , the result is: Mois Année Facture=022014

SubField(DateFacture,'/',2) & '' & SubField(DateFacture,'/',3)   as [Mois Année Facture],

or:

Concat(SubField(DateFacture,'/',2) , SubField(DateFacture,'/',3))as [Mois Année Facture],

help me please

7 Replies
crusader_
Partner - Specialist
Partner - Specialist

Hi,

Just use functions Year(Date), Month(Date), Day(Date).

Hope this helps.

Andrei

Not applicable
Author

Month(DateFacture) & Year(DateFacture) as NewField

Not applicable
Author

Hi,

Thank you, it helps but teh result is oct.2007

how can I convert day in number?

jonathandienst
Partner - Champion III
Partner - Champion III

Hi

Assuming DateFacture is a date:

     =Text(Date(DateFacture, 'MMYYYY'))

HTH

Jonathan

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Not applicable
Author

Please use

Num(Month(DateField))&Year(DateField) as ConcatField

Anonymous
Not applicable
Author

There is no need to concat.  If you date is in the fotmat DD/MM/YYYY, just present it in another way:

date(date#(DateFracture, 'DD/MM/YYYY'), 'MMYYYY')

Not applicable
Author

Hi,

all of your response are correct, Thank for you all