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
The mq4 documents have been updated. They are both in mt4. https://docs.mql4.com/convert/StrToTime and https://docs.mql4.com/convert/stringtotime
Yep, but still gives error code 4051 unless using full format ("yyyy.mm.dd hh:mi")
Yep, but still gives error code 4051 unless using full format ("yyyy.mm.dd hh:mi")
Is it reported to ServiceDesk ?
i dont think so (it's posted here on B604 or so & now on B610 still need to be fixed)
Is it reported to ServiceDesk ?
Yes, I was as negative as I could be so I reported it out of spite . . .
Hi,
StrToTime() generates an error 4051 when just used with a time, for example StrToTime("17:35") if a date and time is used, example: StrToTime("2003.8.12 17:35") there is no error.
This can bee seen with the attached code, run it as an EA and change the input from TimeClose_ = "2003.8.12 21:45 21:45" to TimeClose_ = "21:45"
The help file shows this as an example so it should be valid . . . StrToTime("17:35"); // returns the current date with the given time
Please also note the Russian in the English help file (see below) : [in] Строка в формате "yyyy.mm.dd hh:mi ".
StrToTime
Converts string in the format "yyyy.mm.dd hh:mi" to datetime type (the amount of seconds that have passed since 1 Jan., 1970).
datetime StrToTime(
string value // string
);
Parameters
value
[in] Строка в формате "yyyy.mm.dd hh:mi ".
Returned value
Value of datetime type as a number of seconds, passed since 01.01.1970.
Example:
datetime var1,var2,var3;
var1=StrToTime("2003.8.12 17:35");
var2=StrToTime("17:35"); // returns the current date with the given time
var3=StrToTime("2003.8.12"); // returns the date with the midnight time of "00:00"