how to change long --> datetime ?

 

how to change long --> datetime ?

PositionSelect(break_bar.symbol); /*而家 一個SYMBOL 只可用一個” 利用OPEN_TIME既策略”, 除非 用FILEWRITE 左新個OPEN_TIME*/
   open_time = PositionGetInteger(POSITION_TIME); 

the long is open_time, i want to print it out to debug, but the first thing to do before Print() is to convert open_time from long to datetime format

 

how to do it ?

thanks 

 

the problem that i directly use

Print("open_time") ;

is it's output is

open_time = 1281436292 

but i want the format to be like this:  2010.08.10 07:00:00 

 

how can i do it?

i really puzzle~ ~ 

 

Use

   open_time =(datetime) PositionGetInteger(POSITION_TIME);

 
Rosh:

Use


thanks, rosh

it is work^^ 

Reason: