How to obtain the current time up to 3 decimal places?

Created at 01 Apr 2014, 11:46
How’s your experience with the cTrader Platform?
Your feedback is crucial to cTrader's development. Please take a few seconds to share your opinion and help us improve your trading experience. Thanks!
WE

weesoh

Joined 19.11.2013

How to obtain the current time up to 3 decimal places?
01 Apr 2014, 11:46


Hi,

I noticed that cAlgo prints out 3 decimal places for time information in the logs.  But how do we obtain the time with such precision within the robot program itself?

Thanks!

 


@weesoh
Replies

Spotware
02 Apr 2014, 10:03

you can use Server.Time:

Print("Server.Time.Minute: " + Server.Time.Minute);
Print("Server.Time.Second: " + Server.Time.Second);
Print("Server.Time.Millisecond: " + Server.Time.Millisecond);

 


@Spotware