Download MetaTrader 5

Interesting time output with TimeCurrent()

To add comments, please log in or register
Lovro Mirnik
54
Lovro Mirnik  

I was hoping someone would be able to explain to me why TimeCurrent() used while defining an integer returns such a crazy value:

int TimeNow = TimeCurrent();
Print("TimeNow = " + TimeNow);


An example output:

TimeNow = 1423501132

This would be the time at 22:58:53.647.

Interesting isn't it?

Keith Watford
Moderator
10614
Keith Watford  

Not interesting at all. It is expected

Read the documentation for datetime

TimeCurrent returns a datetime type 

To add comments, please log in or register