String function not returning date, help!
You haven't written the function StrToDate()
Maybe you could use StrToTime(), but that uses "yyyy.mm.dd hh:mi " format
Thanks GumRai, I changed to StrToTime() but it says "no one of theoverloads can be applied to the function call", pls what do you thinkthat can mean and what do I do OR how do I write the function StrToDate() to produce the right result? Thanks
StrToTime() only uses 1 parameter, if you are using more than 1, you are overloading the function
extern string NewsDate = "2015.06.09"; // Date for the News to be released extern string NewsTime = "12:30"; // Time for the News to be released //In your main code string DateTime=StringConcatenate(NewsDate," ",NewsTime); datetime Startdate=StrToTime(DateTime); if(TimeCurrent()==Startdate) //Be careful of using == in case of missed ticks { //perform certain tasks }
Change the format for entering the date as above.
Avoid using DateTime to name a string variable, it can be confusing
StrToTime() only uses 1 parameter, if you are using more than 1, you are overloading the function
Change the format for entering the date as above.
Avoid using DateTime to name a string variable, it can be confusing
Hello Gurus in the house,
I am trying to convert date and time string to function as date and time real time in my ea but keeps giving error 'StrToDate' - wrong parameter count", below are the codes:
pls check and let me know where I got it wrong.
Thanks in advance