[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: vuott@xxxxxxxxxxxx
- Date: Tue, 30 Jul 2024 16:44:08 +0200 (CEST)
- To: Claus Dietrich <claus.dietrich@xxxxxxxxxx>
- Cc: Gambas MailingList <user@xxxxxxxxxxxxxxxxxxxxxx>
Hello,
if I run this code:
Public Sub Main()
Print CDate("00:00")
End
I obtain in console this: 00:00:00
30 lug 2024, 16:36 da claus.dietrich@xxxxxxxxxx:
>
> One of my programs failed today. The reason was surprising:
>
>
> A date consisting of a time component only and generated with an expression equivalent to this
>
>
> dStartTime = cDate("00:00")
>
>
> is regarded as Null. As my program checks the presence of a time expression with
>
>
> if dStartTime then ...
>
>
> it fails, if the time is 00:00, which is supposed to be a valid time.
>
>
> If this is no bug, how can I check whether a date contains a valid time-only-component including 00:00 ?
>
>
> Best regards
>
>
> Claus
>
>
>
>
>
>
>
>
>
>
>
>
| Re: Why is a time of 00:00 regarded as Null? | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |
| Why is a time of 00:00 regarded as Null? | Claus Dietrich <claus.dietrich@xxxxxxxxxx> |