Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
MonthName(Date#(Subfield(PurgeChar(YearMonth,chr(39)),'-',2),'MMMYY')) as new_yearMonth
write above in script
Regards
Maybe: replace(subfield(filebasename(),'-',-1), chr(39), ' 20')
Hi,
Use Subfield() and Date#() and Date()
Try like
MonthName(Date#(Subfield(FileBaseName(),'-',2),'MMMYY'))
Note : for removing ' use purgechar(FileBaseName,Chr(39))
Regards
Hi Max,
Please find the attached xls, I tried but not coming.
Thanks.
Another way::
=monthname(DATE#(replace(TextBetween (fileBaseName(),'-',''),chr(39),''),'MMMYY'))
MonthName(Date#(Subfield(PurgeChar(YearMonth,chr(39)),'-',2),'MMMYY')) as new_yearMonth
write above in script
Regards
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$]);