Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a column in an Excel sheet that contains dates and partial dates, i.e. format. dd/mm/yyyy, mm/yyyy and yyyy. I would like to extract the month and year or null where there is none. Using the Year and Month functions, Qlik extracts 1905 and May, when there isn't one. Any ideas?
Can you provide sample data?
It seems QV is not reading the dates properly. Sample data would be great.
For year:
=if(len(DateField=10,year(DateField),
if(len(DateField)=7,subfield(DateField,"/",2),DateField) as YearField
For month:
=if(len(DateField=10,month(DateField),
if(len(DateField)=7,subfield(DateField,"/",1),null()) as MonthField