Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

Not applicable

How to capitalize(Month)

Hi,

I have a field with data like Jan 2011.

But, some values are in JAN 2011, some are Jan 2011.

How can i standardize all to says Jan 2011?

i tried the following, but i didn't work.

DATE#(capitalize(MONTH_YEAR), 'MMM YYYY') as MONTH_YEAR,

1 Solution

Accepted Solutions
erich_shiino
Honored Contributor

How to capitalize(Month)

Going back to the syntax of your first post, maybe you just need to include the month names in a capitalized form in the beggining of the script:

SET MonthNames='JAN;FEB;MAR ...

Hope this helps,

Erich

13 Replies
nagaiank
Valued Contributor III

Re: How to capitalize(Month)

Try the following expression:

Date(Date#(YourDate,'MMM YYYY'),'MMM YYYY')

Not applicable

How to capitalize(Month)

Thanks, but still the same.

jedgson
Contributor

How to capitalize(Month)

use:

upper(Yourdate)

Jay

nagaiank
Valued Contributor III

Re: How to capitalize(Month)

What I suggested works for me, unless I did not understand your requirement.

See the attached file.

Not applicable

How to capitalize(Month)

ok, but it still didn't work for my case.

upper() will change all to upper but wont keep the date format..

any other way?

nagaiank
Valued Contributor III

Re: How to capitalize(Month)

My logic is as simple as this. If it is not working for you, either your data is not what you think it is or the processing is erroneous. From my example, I am able to establish the processing seems to be correct. Let us then examine your data and what you are doing. If you can attach a sample data and your script, the forum may be able to help.

Not applicable

How to capitalize(Month)

ok, if i put that in expression, it works, but in fact, i'm doin it in the script. that's why it wont work.

whats the different formatting it in expression and in the script?

nagaiank
Valued Contributor III

Re: How to capitalize(Month)

It works in load script also. See the attached file to believe it.

danielrozental
Honored Contributor II

How to capitalize(Month)

Try

LOAD

     capitalize(FULL_NAME) AS FULL_NAME;

select

P.EMPLOYEE AS FULL_NAME

  FROM SDDTA.PhoneReport P

Community Browser