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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
smilingjohn
Specialist
Specialist

Dt

Hi ALl

please find my QVW attached I have a table which has a field called Release

here i need to convert this into date format how do i do it ..

here it should be like 17.2 should be considered as feb 2017 .

17.4  Apr 2017

17.5 May 2017 ...and so on

can someone please help me on this

1 Solution

Accepted Solutions
Kushal_Chawda

try below

monthname(Date#(DateField,'YY.MM')) as MonthYear


or


monthname(date#(subfield(DateField,'.',1) & num(subfield(DateField,'.',2),'00'),'YY.MM')) as MonthYear

View solution in original post

6 Replies
Chanty4u
MVP
MVP

Hi try to create a inline table

a:

load * Inline [

release  ,Build

17.1 ,jan2017

17.2,feb2017

17.3,mar2017

....

.....

];

 

like above till dec2017  and do left join the main table  with release column .

HTH

Chanty

tresesco
MVP
MVP

Try like:

Load

          Date(Date#(Release, 'YY.MM'), 'MMM YYYY')  as NewDate

Kushal_Chawda

=monthname(Date#(DateField,'YY.M')) as MonthYear

prat1507
Specialist
Specialist

Use

Date:

LOAD Release, date(MakeDate('20'&SubField(Release,'.',1),SubField(Release,'.',2),01),'MMM-YY') as Release_new

FROM

(ooxml, embedded labels, table is Sheet2);

smilingjohn
Specialist
Specialist
Author

Hi Kushal

I did it as you said it is not converting properly ...Its consider jan and oct for 17.10

where as it should be oct only for 17.10

Kushal_Chawda

try below

monthname(Date#(DateField,'YY.MM')) as MonthYear


or


monthname(date#(subfield(DateField,'.',1) & num(subfield(DateField,'.',2),'00'),'YY.MM')) as MonthYear