Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Issue with Datefield

Hi All,

I have a date field, 'YR_MTH_KEY' in my source table which is in below format:

201601    

201602    

201603    

201604

201605

201606

201607

201608

201609

But in my chart I want to show it in a more meaningful way like 'MMM-YY' or something like that:

But I'm not able to change my format.

I gave the exp as Date(MonthStart(Date#(YR_MTH_KEY, 'YYYYMM'))), I got some junk value. Any idea how I should give my expression for the date field.

7 Replies
Anonymous
Not applicable
Author

Date((Date#(YR_MTH_KEY, 'YYYYMM')))


Or



(Date#(YR_MTH_KEY, 'YYYYMM')

sunny_talwar

Strange it did not work, but you did not provide MMM-YY to it? Not sure this will work, but try this:

Date(MonthStart(Date#(YR_MTH_KEY, 'YYYYMM')), 'MMM-YY')

Not applicable
Author

Its returning junk values like:

Mar-91

Apr-94,

Apr-97,

May-00

Jun-03

Jan-40

Not applicable
Author

Its returning junk values like:

Mar-91

Apr-94,

Apr-97,

May-00

Jun-03

Jan-40

rupamjyotidas
Specialist
Specialist

are those values format are in text or numbers, if in Numbers the above equations would work.

vishsaggi
Champion III
Champion III

May be trythis?

LOAD Date(MakeDate(Left(YRMonthKey,4), Right(YRMonthKey,2)), 'YYYYMM') AS YrMonthKey;

LOAD * INLINE [

YRMonthKey

201601   

201602   

201603   

201604

201605

201606

201607

201608

201609

];

sunny_talwar

Will you be able to share your application, I am amazed its doing this