Datetime Suggestion

 

I noticed that if you declare similar to the following line in your program



datetime Compile = D'';




You get the following warning message at the time of compilation



'' - date literal string is incomplete



However, the value is correctly assigned to the variable (which is today's date). I suggest either correct the text in your online book (visit https://book.mql4.com/basics/types#14) or enhance the compiler. I found a workaround this problem for now to avoid the warning message. Here is how I do it.



datetime Compile=TimeCurrent()-(Hour()*3600+Minute()*60+Seconds());


It does the job without any errors or warning messages.