There are 376565 days between 1970.01.01 00:00:00 and 3000.12.31 23:59:59. so the number of seconds is 376565*24*60*60-1=32535215999.
but computing in MQL5,
The output result is:
2013.12.08 00:32:05.924 aaa (EURUSD,M5) 2470444927
2013.12.08 00:32:05.924 aaa (EURUSD,M5) 3000.12.31 23:59:59
Why are you thinking datetime is an unsigned int ? Documentation said it's an 8 bytes value, so it's a long not an int.
printf("As number of seconds %llu",AA);
Result:
2013.12.07 18:14:07 Test (EURUSD,H1) As number of seconds 32535215999
There are 376565 days between 1970.01.01 00:00:00 and 3000.12.31 23:59:59. so the number of seconds is 376565*24*60*60-1=32535215999.
but computing in MQL5,
The output result is:
2013.12.08 00:32:05.924 aaa (EURUSD,M5) 2470444927
2013.12.08 00:32:05.924 aaa (EURUSD,M5) 3000.12.31 23:59:59
Try . . .
printf("%I64",AA);
. . . for an unsigned long
Try . . .
. . . for an unsigned long
- "%I64" isn't a valid format. See documentation.
- I64 isn't specific to unsigned, it's available for signed also.
- You have to use "%I64u" or "%llu" as I previously posted.
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
You agree to website policy and terms of use
There are 376565 days between 1970.01.01 00:00:00 and 3000.12.31 23:59:59. so the number of seconds is 376565*24*60*60-1=32535215999.
but computing in MQL5,
The output result is:
2013.12.08 00:32:05.924 aaa (EURUSD,M5) 2470444927
2013.12.08 00:32:05.924 aaa (EURUSD,M5) 3000.12.31 23:59:59