Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Change date format!!

hi all..I have a scenario where i read data from the excel spreadsheet which has a date column of format(MMM YYYY), but it is interpreting the data present in that column as an integer..my dates are like [42644.0] for oct 2016, [42614.0] for sept 2016 and so on..I tried everything but nothing worked for me..I guess QV is taking it as text.. In This case how do i proceed as to get the desired output in the MMM YYYY format..please help!!

7 Replies
vinieme12
Champion III
Champion III

Date#(fieldname,'MMM  YYYY') as fieldname

Or

Date(fieldname,'MMM  YYYY') as fieldname

Use the above during load

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
jonathandienst
Partner - Champion III
Partner - Champion III

The underlying value in  Excel is the date number, so all you need in QV is to format it as a date:

     Date(FieldName) as Date

Logic will get you from a to b. Imagination will take you everywhere. - A Einstein
Anonymous
Not applicable
Author

guys thanks for help..but didn't work for me..I've tried like almost everything..can't fix it..QV is reading it as text..num(), num#(), alt(), date() or date#() none are working..is there any other way out to fix this?

vinieme12
Champion III
Champion III

go to Number Tab >> Select Date >> in format expression type MMM YYYY

or post the app the demonstrates the problem

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.
buzzy996
Master II
Master II

sample app,pls?

buzzy996
Master II
Master II

or try this way :

Date(AddYears(Date(Date#('19'&Right(yrdatefield,6),'YYYYMMDD'),'DD/MM/YYYY')

          ,100*Left(yrdatefield,1)),'DD/MM/YYYY') As  NewDatefield;

sangeess21
Creator
Creator

Goto Settings--> Document Properties-->Number tab--> Select the date field and change the number format settings to Date. (Change the format pattern to MMM/YYYY)

Thanks,

Sangeetha