[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Print to file question



PureBytes Links

Trading Reference Links

Some time ago an Excel program was released with this code:

------------------

Vars: Value99(-1);




vars:sym(""),mystr(""),net(0) ;		

if CurrentBar=1  then sym=GetSymbolName;		

value11=MarketPosition(0);		
value12=NetProfit;		

if DataCompression=2 then begin    {begin daily data routine}		
	value13=value12-value12[1] ;	
	mystr=sym +","+ NumToStr(d,0)+","+
NumToStr(value11,0)+","+NumToStr(value13,2);	
	FileAppend("c:\dailypl.por",mystr+NewLine);	
end else begin   {begin intraday data routines}		
	if d <> d[1]  then begin	
		value13=value12[1] - net;
		mystr=sym +","+ NumToStr(d[1],0)+","+
NumToStr(value11[1],0)+","+NumToStr(value13,2);
		FileAppend("c:\dailypl.por",mystr+NewLine);
		net=value12[1];
	end;	
	if  lastbaronchart then begin	
		value13=value12 - net;
		mystr=sym +","+ NumToStr(d,0)+","+
NumToStr(value11,0)+","+NumToStr(value13,2);
		FileAppend("c:\dailypl.por",mystr+NewLine);
	end;	
end;		

--------------------

It prints out two digits for the date which was fine until the year 2000
came along.  Is there a way to modify this code to export the date in a
four digit format?

Thanks,

Vince