Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Highlighted
myhammer
New Contributor

month name from textfield

Hello,

I am trying a lot but I dont get it to work. Hopefully someone can help me.

I have a textfield with "Transaction Fees "&Monthname&Year

I want to take the monthname and Year from this field into a new field and convert it to a date.

How can I do this?

Very much thanks for your help in advance.

Chris

1 Solution

Accepted Solutions

Re: month name from textfield

I think your environmental variable is in another language which is why MMMM is unable to recoginze them as months...

SET LongMonthNames='Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember';

Try this

SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

10 Replies

Re: month name from textfield

May be try this

Date(Date#(PurgeChar(SubField(FieldName, 'Transaction Fees ', -1), ' '), 'MMMYYYY')) as Date

myhammer
New Contributor

Re: month name from textfield

Hello Sunny,

thank you very much. I think it helped.But only May-Months are shown correctly.

Is it possible, that this has to do with the blanks after the monthname?

I have no idea how much blanks are there.

You have an idea of a solution?

Re: month name from textfield

My bad.. I missed the extra M

Date(Date#(PurgeChar(SubField(FieldName, 'Transaction Fees ', -1), ' '), 'MMMMYYYY')) as Date

myhammer
New Contributor

Re: month name from textfield

Hello Sunny,

it unfortunately did not work. Would you please have a look?

it is in Adyen SettlementReport Line 36

Re: month name from textfield

Which tab am I looking at?

myhammer
New Contributor

Re: month name from textfield

it is in script in Tab Adyen SettlementReport (line 36)

Re: month name from textfield

I think your environmental variable is in another language which is why MMMM is unable to recoginze them as months...

SET LongMonthNames='Januar;Februar;März;April;Mai;Juni;Juli;August;September;Oktober;November;Dezember';

Try this

SET LongMonthNames='January;February;March;April;May;June;July;August;September;October;November;December';

myhammer
New Contributor

Re: month name from textfield

now it worked for june and july.

is it possible to eliminate the blanks between month name and year.

for every monthname they are different 😞

Re: month name from textfield

That is what PurgeChar is doing... removing the spaces between Monthname and Year