Hallo, when i export a txt file should be possible to format the name including the date?
today i have one initial variable like this: FName = "C:\Temp\CheckList.TXT";
Should be possible to append the date somehow?
multicharts date in file name [SOLVED]
- TJ
- Posts: 7740
- Joined: 29 Aug 2006
- Location: Global Citizen
- Has thanked: 1033 times
- Been thanked: 2221 times
Re: multicharts date in file name
Have you checked the Wiki for usage examples of datetostring ?i tried to solve like this FName3 = "C:\Temp\CheckList_BLSH"+datetostring(date)+".txt";
but i got error because i cannot create file with special character "/"
any idea?
- Smoky
- Posts: 507
- Joined: 03 Dec 2010
- Location: Thailand
- Has thanked: 97 times
- Been thanked: 115 times
Re: multicharts date in file name
function to setup file name "SUFIXELOG"
calling code:
working well...
Code: Select all
INPUT: MasterName(string);
var: TempName(""), dat(""),heur("");
dat = NumToStr(currentdate,0);
heur = NumToStr(currentTime,0);
TempName= "C:\CSV\"+ MasterName+ "." + dat +"."+ heur +".csv";
SUFIXELOG=TempName;
Code: Select all
var: filename("tradelog"), Field("name;price;win");
once
begin
filename=SUFIXELOG(filename);
end;
print(file(filename),Field);