Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
siva_boggarapu
Creator II
Creator II

How to get 2017-11 from the file name?

Hi Team,

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

Thanks,

Siva

14 Replies
Chanty4u
MVP
MVP

you want output  like this?

2017-11.xlsm

gerry_hdm
Creator II
Creator II

you can read the filetime  from the qvd  by the Reload

QvdCreateTime('\\C:mydocs\qlikfile.qvd') as StandFile.#stand,

Chanty4u
MVP
MVP

am not sure what you are expecting?

you can get

load *,

Keepchar(Filebasename(),'0123456789') as New

];

siva_boggarapu
Creator II
Creator II
Author

Hi Chanty,

I want to display

2017-11 out from the file CARSTAR - State Farm MSO RPM - 2017-11.xlsm


thanks,

Siva

Chanty4u
MVP
MVP

try this

AA:

LOAD * ,KeepChar(A,'1234567890') as Filename;

LOAD * Inline [

A

CARSTAR - State Farm MSO RPM - 2017-11.xlsm

];

siva_boggarapu
Creator II
Creator II
Author

I need like

Load *

SubField(CARSTAR - State Farm MSO RPM - 2017-11.xlsm ,) as  date


I want out like 2017-11 as filed name


Thanks,

Siva



YoussefBelloum
Champion
Champion

another option can be like this:

=Subfield(filebasename(),'RPM -',2)

siva_boggarapu
Creator II
Creator II
Author

=Subfield(filebasename(),'RPM -',2)

I am getting out like 2017-11.xlmx

But I want only 2017-11

bramkn
Partner - Specialist
Partner - Specialist

TextBetween(text, delimiter1, delimiter2[, n])