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

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
erichshiino
Partner - Master
Partner - Master

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

View solution in original post

13 Replies
nagaiank
Specialist III
Specialist III

Try the following expression:

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

Not applicable
Author

Thanks, but still the same.

jedgson
Creator
Creator

use:

upper(Yourdate)

Jay

nagaiank
Specialist III
Specialist III

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

See the attached file.

Not applicable
Author

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
Specialist III
Specialist III

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
Author

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
Specialist III
Specialist III

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

danielrozental
Master II
Master II

Try

LOAD

     capitalize(FULL_NAME) AS FULL_NAME;

select

P.EMPLOYEE AS FULL_NAME

  FROM SDDTA.PhoneReport P