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

Help- Can't get month name

The field is named ship_(shdate. It looks like  3/14/11, 4/01/10...

I want it to look like Jan, Feb, Mar ...

When I do MonthName(ship_date)  I get  4.06+e....

When I do Month(ship_date), I get #'s.

I suspect this is easy,  but after and hr of searchign the forum, I still don't know how to sold this.

thanks!

7 Replies
Not applicable
Author

I believe the field first must be recognized and imported as a date, and you must ensure that the date formatting option or functions reflect what you want.

Could you attach of copy of your data and application file?

Not applicable
Author

Everthing is standard

SET DateFormat='M/D/YYYY';

Load [Ship_date]

This is exported from excel.

nagaiank
Specialist III
Specialist III

Try  Month(Date#(Ship_date,'MM/DD/YYYY'))

Not applicable
Author

didn't work

Month(Date#(Ship_date,'MM/DD/YYYY'))  - yeilds nothing

Month(Date#(Ship_date,'MM/DD/YY'))  - yeilds nothing

Month(Date(Ship_date,'MM/DD/YY')) - yields '1', '3', '5' ....

Anonymous
Not applicable
Author

Hallo,

does this this go in the right direction ?

see attached files.

regards

Antonio

kim_rormark
Partner - Contributor III
Partner - Contributor III

apprentice's method works, but I think if your DateFormat is set in a different format than what you have in your DB you can use the following:

LOAD Date,

          Month(Date#(Ship_date, 'MM/DD/YY')) as MonthName

If this doesn't solve your problem, something else is wrong. It works for me in my QV10 and also for apprentice.

Not applicable
Author

Here's how I did it for a field that I had as Period (represented by the ,1)

load

dual ( string,Period ) as [Fiscal Month] inline

[ string,Period

Feb,1

Mar,2

Apr,3

May,4

Jun,5

Jul, 6

Aug, 7

Sep, 8

Oct, 9

Nov, 10

Dec, 11

Jan, 12
]
;

LOAD

Period, Period as [Fiscal Month]
FROM [\\MANNETAPP01\BST_Shared_Folder\FY12\ATF\OPEX\FY12 Opex Reporting Q2.xlsx]
(
ooxml, embedded labels, table is data);