[Gambas-user] Date(Now) with time component under Ubuntu?

Gianluigi bagonergi at gmail.com
Mon Dec 10 12:22:22 CET 2018


Il giorno lun 10 dic 2018 alle ore 11:36 Rolf-Werner Eilert <
rwe-sse at osnanet.de> ha scritto:

> Am 06.12.18 um 22:48 schrieb Benoît Minisini:
> > Le 06/12/2018 à 18:59, Gianluigi a écrit :
> >> You nust not have to mix the functions that locate (Date, Str, Val)
> >> with those that do not locate (CDate, CString).
> >> "Date" takes away the time part.
> >>
> >
> > Or, if it's clearer for you Rolf, Date() moves the date to midnight in
> > your timezone.
> >
>
> Yes, that means the time part remains in the string and is not cut away
> - as the help text suggests and as it used to be before.
>
> Though I would consider this to be logical:
>
> Day(Now) =  only the calendar day (as integer)
> Year(Now) = only the year (as integer)
> Date(Now) = only the date part
> Time(Now) = only the time part
>
> But anyway, I've adapted my program to it, so there's no more problem
> right now. I'd only suggest someone adapts the help text to avoid
> confusion.
>
> Regards
> Rolf
>

With the dates it's easy to get confused, I think everyone happens, it
happens to me often.
It is important to remember that when we use Print, Debug but I also think
of the Text property, Gambas creates a local conversion of type string
(Str$) [0]

Regards
Gianluigi

[0] http://gambaswiki.org/wiki/lang/debug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gambas-basic.org/pipermail/user/attachments/20181210/b64d67ca/attachment.html>


More information about the User mailing list