[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Why is a time of 00:00 regarded as Null?
[Thread Prev] | [Thread Next]
- Subject: Re: Why is a time of 00:00 regarded as Null?
- From: Fabien Bodard <gambas.fr@xxxxxxxxx>
- Date: Mon, 5 Aug 2024 16:28:11 +0200
- To: user@xxxxxxxxxxxxxxxxxxxxxx
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
>
>
>
>
>
>
>
>
| Re: Why is a time of 00:00 regarded as Null? | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |