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

Re: Date plus integer


Le 18/04/2024 à 09:40, Gianluigi a écrit :

Hi Benoit,

sorry, he had passed me a wrong code, he meant this:

Public Sub Main()

   Dim dDate As Date

   dDate = Now()
   Print dDate

   dDate += 1

   Print dDate

End

In fact the result of dDate + 1 differs depending on the version:
04/19/2024 09:24:49 on 3.18.04
and 2492524,30947895 on 3.19

Regards
Gianluigi



It's a bug then. (dDate + 1) is a Float, but when assigning the result to dDate, it must be converted back to a Date automatically.

Regards,

--
Benoît Minisini.


Follow-Ups:
Re: Date plus integerBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
Date plus integerGianluigi <gradobag@xxxxxxxxxxx>
Re: Date plus integerBruce Steers <bsteers4@xxxxxxxxx>
Re: Date plus integerGianluigi <gradobag@xxxxxxxxxxx>
Re: Date plus integerBenoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
Re: Date plus integerGianluigi <gradobag@xxxxxxxxxxx>