Download MetaTrader 5

date/time, seconds since 1970

To add comments, please log in or register
trader88888
134
trader88888  

hello.

 

Im trying to get the output for the amount of seconds since jan 1, 1970.

 The output I desire should look something like this:   1413424764

 

I can't seem to figure this out, i've been over the documents and i keep getting the date written out such as Jan 01, 1970   or the amount of seconds it took to execute the script..

 

Can someone show me an example of what i need in order to get this output Im desiring?  

 

ty 

Carl Schreiber
6693
Carl Schreiber  

you have to cast it into a ulong:

datetime n = 1413424764;
Print( string( (ulong)n ) );
To add comments, please log in or register