AFAIK everything is possible in this century
jal_fr:
I get 2 vars on a CSV file. "date" : 15.01.2013 and var "time" : 18 (ie the January 15, 2013 at 18h).
I can put this format as I want. I wonder if anyone knows a way to know how many times in minutes it rest before that date from the current date?
I get 2 vars on a CSV file. "date" : 15.01.2013 and var "time" : 18 (ie the January 15, 2013 at 18h).
I can put this format as I want. I wonder if anyone knows a way to know how many times in minutes it rest before that date from the current date?
- format the strings to mql4 format D'1980.07.19 12:30:27'
- convert to a datetime
- compare to currenttime
datetime csvDT = CsvToDT(csvDateStr, csvTimeStr), now = TimeCurrent(); int seconds = csvDT - now, minutes = seconds/60;
OK, i think a found a solution with this function
https://docs.mql4.com/convert/StrToTime
StrToTime will ONLY work if you format the string to mql4 format and you said you already know how to do that.
If you can arbitrarily chose the format while creating the csv file (this is how I interpret what you said) then maybe it is possible to format the date as a unix time stamp from the beginning on and never actually use any date strings anywhere. (A timestamp is a simple integer number of seconds) then you can just use it in mql4 as it is (mql4 datetime is also just an ordinary unix timestamp (and the mql4 DateTime type is just an alias for int, its a number you can easily add and subtract).
You are missing trading opportunities:
- Free trading apps
- Over 8,000 signals for copying
- Economic news for exploring financial markets
Registration
Log in
You agree to website policy and terms of use
If you do not have an account, please register
I get 2 vars on a CSV file. "date" : 15.01.2013 and var "time" : 18 (ie the January 15, 2013 at 18h).
I can put this format as I want. I wonder if anyone knows a way to know how many times in minutes it rest before that date from the current date?
At least know if it's possible ...
Image explainationSorry for my bad English ! Friendly.