[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Why is a time of 00:00 regarded as Null?


A date always contain a date value 😳.

Le mar. 30 juil. 2024 à 19:21, Claus Dietrich <claus.dietrich@xxxxxxxxxx> a
écrit :

> Hi
> Am 30.07.24 um 16:44 schrieb vuott@xxxxxxxxxxxx:
>
> Hello,
> if I run this code:
>
> Public Sub Main()
>
>   Print CDate("00:00")
>
> End
>
> I obtain in console this:   00:00:00
>
> The penny dropped. I fooled myself with my traditional understanding of
> Null which didn't cover all aspects. IsNull(CDate("00:00")) provides True
> but a date doesn't need to be initialized. It has a time (zero) in the
> moment of declaration. Hence there is no way to test, whether a date got a
> time value. I need to find a different solution.
>
> Thanks and best regards
>
> Claus
>
>
>
>
>
>
>
>

Follow-Ups:
Re: Why is a time of 00:00 regarded as Null?Claus Dietrich <claus.dietrich@xxxxxxxxxx>