I have below file name. But I want to display in load statement 2017-11 from the below file name?
CARSTAR - State Farm MSO RPM - 2017-11.xlsm
you want output like this?
I want to display
2017-11 out from the file CARSTAR - State Farm MSO RPM - 2017-11.xlsm
LOAD * ,KeepChar(A,'1234567890') as Filename;
LOAD * Inline [
I need like
SubField(CARSTAR - State Farm MSO RPM - 2017-11.xlsm ,) as date
I want out like 2017-11 as filed name
you can read the filetime from the qvd by the Reload
QvdCreateTime('\\C:mydocs\qlikfile.qvd') as StandFile.#stand,
am not sure what you are expecting?
you can get
Keepchar(Filebasename(),'0123456789') as New
another option can be like this:
I am getting out like 2017-11.xlmx
But I want only 2017-11
TextBetween(text, delimiter1, delimiter2[, n])
My bad, I thought it was the file extension..
you can do a lot of things to remove xlmx, like this one
=purgechar(SubField(Filebasename() ,'RPM -',2),'.xlmx')
I have load script like below.
vFilename=lib://DEV - QVD Extracts/Intake_Carstar_USA/StateFarm_RPM/CARSTAR - State Farm MSO RPM - 2017-11.xlsm
subfiled($(vFilename),-) as date
I want to get date like 2017-11
How Can I get it?
I don't know how you created the variable on the script, but I suppose that it give you this:
lib://DEV - QVD Extracts/Intake_Carstar_USA/StateFarm_RPM/CARSTAR - State Farm MSO RPM - 2017-11.xlsm
you can try this:
PurgeChar(SubField($(vFilename) ,'RPM -',2),' .xlsm') as date
Its giving '-' result. I want like 2017-11
Create a sample QVF file on which you have just your variable and your wrong output '-' and attach it.
Retrieving data ...