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

Re: sString = Date(hBlah) returns 11pm


Ummm... wait, no, it does not work as in the documentation.

Dim sDate As String = Date(Now)
Print sDate

Yields; "04/12/2024 21:00:00" instead of "04/12/2024".


Jussi

On Sat, Apr 13, 2024 at 12:16 AM Jussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
wrote:

> In my understanding it is behaving as designed. See the example part.
> Note that Gambas do not have simple paper calendar type date & time
> features.
>
>
> Jussi
>
> On Fri, Apr 12, 2024 at 11:53 PM Bruce Steers <bsteers4@xxxxxxxxx> wrote:
>
>>
>> Not long ago using the following...
>>
>> Dim sString as String
>> sString = Date(Now)
>> Print sString
>>
>> Would print the date without the time
>>
>> i even mentioned it on the wiki
>> https://gambaswiki.org/wiki/lang/date
>>
>> Now it is printing the date with the time added as 23:00:00
>>
>> I have just re-installed my operating system.
>> Did gambas change something or is this system dependent and I've changed
>> something and my advice on the wiki is wrong?
>>
>> Respects
>> BruceS
>>
>>

Follow-Ups:
Re: sString = Date(hBlah) returns 11pmGianluigi <gradobag@xxxxxxxxxxx>
References:
sString = Date(hBlah) returns 11pmBruce Steers <bsteers4@xxxxxxxxx>
Re: sString = Date(hBlah) returns 11pmJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>