Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have on one excel file like "Sale (Feb-2014).xlsx" .
I want to pick above Feb-2014 from excel and link to the master calender.
Need help.
Thanks,
Prashant
Use filebasename(), like:
Load *,
Date(Date#(TextBetween(filebasename( ), '(',')' ), 'MMM-YYYY')) as Date
From <>;
Use filebasename(), like:
Load *,
Date(Date#(TextBetween(filebasename( ), '(',')' ), 'MMM-YYYY')) as Date
From <>;
Hi Tresesco,
It is working you have any master calender script so I link them to each other.
Thanks,
Hi
You could use the function "FileName" in your script. This will give you the whole filename.
To pick the actual date part out you can use the "Mid" function, you could also use "Subfield" as well but in this case that would require more steps.
This is an example of how it might look.
Mid(FileName(),6,8) As FileNameDate,
Check this: Creating A Master Calendar
Trescos solution is of course much better, a bit early in the morning for me (05:00 local time)