Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Convert the integer to date format(MMM-YY)

Hi All,

I have a scenario where i read data from the excel spreadsheet which has a date column of format(MMM-YY), but it is interpreting the data present in that column as an integer as [40179]  for JAN-10.  In This case how do i proceed as to get the desired output in the MMM-YY format.

Regards,

surman

 

21 Replies
Jason_Michaelides
Luminary Alumni
Luminary Alumni

Try:

Date(YourDateField,'MMM-YY'). AS Date

Hope this helps,

Jason

senpradip007
Specialist III
Specialist III

Hi

Date(DateTest,'MMM-YY') as DateTest

Try this

Hope it helps.

Regards

Pradip

Not applicable
Author

I think you should use DATE#() to read the data from excel and use DATE() to display the it.

DATE( DATE#(date_excel, 'MMM-YY'),'MMM-YY')

Faisal

Not applicable
Author

Hi,

Try to change settings in your main tab of qlikview. Snapshot attached for your reference with changes highlighted. Hope this is what yo want and this might be of some help.

Date.jpg

Regards

Mayank

Not applicable
Author

Hi Guys,

I tried all your approaches, unfortunately none worked as per my

requirement

Regards,

Mansoor

MayilVahanan

Hi

     Can you post a sample data ?

= Date(40179,'MMM-YY') gives Jan-10 for me.

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
MayilVahanan

HI

     I think [40176] is your format?

     Am i correct?

      if so,

     = Date(PurgeChar('[40179]','[]'),'MMM-YY') gives Jan -10

     Hope it helps

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
Not applicable
Author

Hi Mayil,

For ur reference i  have posted the sample data as well. It would be nice if you could send me the code as well,

Please find the below code generated while making use of the crosstab utility

Crosstab:

CrossTable(SalesDate, Sales, 3)

LOAD Brand,

     Model,

     [No of Doors],

     [40179],

     [40210],

     [40238],

     [40269],

     [40299]

FROM

(ooxml, embedded labels, table is [Input Data]);

load

SalesDate,

date(date#(SalesDate,'MMM-YY'),'MMM-YY') as Sales_Date

resident Crosstab;

Not applicable
Author

Hi,

This is the sample data for ur reference

BrandModelNo of DoorsJan-10Feb-10Mar-10Apr-10May-10
HondaCIVIC301211
HondaCR-Z344255
HondaCIVIC455582
HondaACCORD433443
HyundaiI10301234
HyundaiI203691356
HyundaiI40434969
HyundaiSONATA4458912
SuzukiAlto41816141812
SuzukiSwift4913111815