Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
udaya_kumar
Specialist
Specialist

Date format issue

Hi,

I have a date field called "Month_Name".

I have values in that field like

2011

2012

2013

1/5/2014

2/4/2014

.

.

.

When i load this field into qlikview, i am getting values like

7/3/1905

7/4/1905

7/5/1905

1/5/2014

2/4/2014

.

.

.

So the years like 2011, 2012, 2013 values are converted to some date format.

But i dont want that format. I want the values to be like 2011,2012,2013,1/5/2014,2/4/2014.

How can we achieve this?

Can someone help me please?

Thanks in advance

7 Replies
Not applicable

Why do you have years in Month_Name?

Could u provide sample file=?

ashwanin
Specialist
Specialist

Hi

Can you provide the sample file, from where you are loading the dates in QV?

ashfaq_haseeb
Champion III
Champion III

Hi, try like below.

if (len(Month_Name)=4,num(Month_Name),(Month_Name)) as Date

Regards

ASHFAQ

udaya_kumar
Specialist
Specialist
Author

Hi Thomas,

Thanks for the reply.

The requirement was like that, they want to see year and month together as a dimension in a chart.

So we added year and month together in a single field.

udaya_kumar
Specialist
Specialist
Author

Hi Ashfaq,

I tried that same expression before.

But problem is, it is loading the year like that in front end.

So the len(Month_Name)=4 condition is not working.

MK_QSL
MVP
MVP

Try something like below

Load

ALT(Date(Date#(Date,'YYYY'),'YYYY'),

  Date(Date#(Date,'M/D/YYYY'))) as Date

Inline

[

  Date

  2011

  2012

  2013

  1/5/2014

  2/4/2014

];

ashfaq_haseeb
Champion III
Champion III

Hi, can you attach your qvw.

Regards

ASHFAQ