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: 
Not applicable

Function Help

Hi

My filebaseName() is - SCR-May'15, Now I want to convert the same string in Year Month, i.e.. - May 2015.

Is it possible to convert the same.

Thanks

1 Solution

Accepted Solutions
PrashantSangle

MonthName(Date#(Subfield(PurgeChar(YearMonth,chr(39)),'-',2),'MMMYY')) as new_yearMonth

write above in script

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂

View solution in original post

6 Replies
Gysbert_Wassenaar

Maybe: replace(subfield(filebasename(),'-',-1), chr(39), ' 20')


talk is cheap, supply exceeds demand
PrashantSangle

Hi,

Use Subfield() and Date#() and Date()

Try like

MonthName(Date#(Subfield(FileBaseName(),'-',2),'MMMYY'))

Note : for removing ' use purgechar(FileBaseName,Chr(39))

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
Not applicable
Author

Hi Max,

Please find the attached xls, I tried but not coming.

Thanks.

robert_mika
Master III
Master III

Another way::

=monthname(DATE#(replace(TextBetween (fileBaseName(),'-',''),chr(39),''),'MMMYY'))

PrashantSangle

MonthName(Date#(Subfield(PurgeChar(YearMonth,chr(39)),'-',2),'MMMYY')) as new_yearMonth

write above in script

Regards

Great dreamer's dreams never fulfilled, they are always transcended.
Please appreciate our Qlik community members by giving Kudos for sharing their time for your query. If your query is answered, please mark the topic as resolved 🙂
robert_mika
Master III
Master III

Directory;

LOAD ProductCode,

     SellerCode,

    

     monthname(DATE#(replace(TextBetween (YearMonth,'-',''),chr(39),''),'MMMYY')) as YEarMonth

   

FROM

TESTDATA.xls

(biff, embedded labels, table is [TB06_20150520_123238$]);