Download MetaTrader 5

date/time, seconds since 1970

To add comments, please log in or register
Format text in the messages editor. It is convenient!
trader88888
134
trader88888 2014.10.16 02:01 

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
6580
Carl Schreiber 2014.10.16 06:22  

you have to cast it into a ulong:

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