How to check if TDateTime option?

I have an object that has one value, but this value can be either integer , string , boolean , or TDateTime . So this is Variant .

I use VarType() to check its type, but since VarType() does not have "varDate" or "varDateTime", I use "varDouble" because, as far as I can compile, TDateTime is double .

But this returns false. I also cannot use is to check for Variant TDateTime . Is there a way, or do I need to make some kind of type variable that determines what type this value is and use it to check?

+4
source share
1 answer

Your assumptions are incorrect; actually there is varDate .

+7
source

Source: https://habr.com/ru/post/1468983/


All Articles