Oh yes, it looks as if it would work fine.
Now I want to understand, if my solution needs a warning, that it leads to a mess in the long run.
To make it clear.
It is not about NULL / NIL, it is about zero.
If zero is the default value for not NIL, worsens the thing.
Since years, really since years, I struggle with this empty date in many places.
I could not check if there is an empty string in my edits, which shall be a field for a date.
Believe me, I tried it all, comparing against ' ', IsEmpty and I cannot say what else.
At the end I wrote reset routines, field by field for a check, - this kept me busy for really a long time.
The computer figured: field / value empty ► zero ► valid date.
In my problem today, the zero-value-for-date comes from an US database, which I bought.
In other words:
I want to say, "the value zero for a date is NOT valid"
My question is now, if my working solution works or only looks as it would work.
Testing this is really hard, because it takes about a quarter of an hour after having chosen "run", until I see anything.
@Thaddy can you say more about?
In this thread I read, that the internal structure of a firebird date would be an integer.
In Delphi it is a double.
Are you sure, that it is a double in Firebird as well?
And are you sure, that Firebird weill trouble me?
If yes, how exactly?
We have a type date, not Timestamp.
@rvk
Why shall I prefer '1960-01-01'
and of course this was a typo > '1.1.1960'?
correct is, that I wrote
> '01.01.1960'?
I did this, because this seems format of many conversion routines of all kinds as input and output including FlameRobin