Hey guys,
I want to record prices at specific time, for example 9:00 am. And on a specific date.
So I've created date and time parameters. Also checking if day starting time is matching the desired parameter with DateTimeDiff().
For what it is worth, AmiBroker uses No-Nonsense naming convention for functions. If it did not occur to you yet, ALL functions that have "DateTime" prefix in a function name expect and work only on DateTime values. The same TimeFrame functions have TimeFrame prefix, string functions have Str prefix, Internet functions have Internet prefix and so on and so on. Without reading the docs it should be absolutely obvious that DateTimeConvert expects DateTime input.
To me date is date and time is time )))
DateTime actually was not that straightforward to understand (for me) just based on the name.
And there is no TimeNumDiff() function (while for DateTime there is for some reason). For experienced Amibroker coders everything in the manual makes perfect sense, but for me all this is not that easy =)
And I am super grateful for all the help and explanations you guys provide. So thank you
My thinking was to compare times only within same day (didn't even occur to me that times will be compared on different days). For example in my case I wanted to check if current time 9:15 is bigger than 3:00.
The problem is solved and I got everything working thanks to the solution above =)