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

Re: sString = Date(hBlah) returns 11pm


Yes there is something wrong, here it is 11:49pm and it returns 10:00pm

Regards
Gianluigi

Il 12/04/24 23:21, Jussi Lahtinen ha scritto:
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 <mailto: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
    <mailto: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
        <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



References:
sString = Date(hBlah) returns 11pmBruce Steers <bsteers4@xxxxxxxxx>
Re: sString = Date(hBlah) returns 11pmJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>
Re: sString = Date(hBlah) returns 11pmJussi Lahtinen <jussi.lahtinen@xxxxxxxxx>