[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Date plus integer
[Thread Prev] | [Thread Next]
- Subject: Re: Date plus integer
- From: Bruce Steers <bsteers4@xxxxxxxxx>
- Date: Wed, 17 Apr 2024 16:32:08 +0100
- To: user@xxxxxxxxxxxxxxxxxxxxxx
On Wed, 17 Apr 2024 at 16:21, Gianluigi <gradobag@xxxxxxxxxxx> wrote: > Il 17/04/24 17:09, Bruce Steers ha scritto: > > > > > > On Wed, 17 Apr 2024 at 15:56, Gianluigi <gradobag@xxxxxxxxxxx > > <mailto:gradobag@xxxxxxxxxxx>> wrote: > > > > Hi Benoit, > > > > until version 3.18.4 if you added an integer to a date it returned a > > date. > > Now it returns a number: Print Now() + 1 ' <--- 2492523,6124732 > > Is this a bug? > > > > > > No it's just bad coding results ;) (hehe only joking) > > Print CDate(Now + 1) > > > > that works as you are actually asking for a date object > > > > just using "Now + 1" makes the interpreter do a calculation/sum that > > returns a float. > > Respects > > BruceS > > > > But my question was another: > Why did it work until yesterday (3.18.4)? > Evidently yesterday it was a good way to codify :-) It may be similar to a Date issue I had recently that had only shown itself because daylight savings. Something that worked before England went from GMT to BST stopped working (something to do with no longer being UTC) I could write this.. Dim s as String = Date(Now) Print s in GMT it printed just the date with no time, then once in BST it started printing the time as 23:00:00 too :-\ I'm sure Benoit will be able to explain why the sudden change for you. Respects BruceS Regards > Gianluigi > > >
Date plus integer | Gianluigi <gradobag@xxxxxxxxxxx> |
Re: Date plus integer | Bruce Steers <bsteers4@xxxxxxxxx> |
Re: Date plus integer | Gianluigi <gradobag@xxxxxxxxxxx> |