[Gambas-user] With Date one day less

Benoît Minisini gambas at ...1...
Sat Jan 21 19:34:43 CET 2017


Le 21/01/2017 à 19:22, Gianluigi a écrit :
> Hi Charlie,
>
> I thank for the answer and will do so too.
> But my poor mind cannot comprehend the question of time zone.
>
> Regards
> Gianluigi
>
>

If you convert a string to a date, then the string is assumed to be an 
UTC time, *not* a local time.

To convert a local time as a string to a date, you must use the Val() 
function. Or, as Karl said, you can use the Date() function if you have 
the date split into its different components.

It's exactly the same with numbers!

CStr() and CFloat() assume the american format (which is like "UTC" for 
numbers).

Str() and Val() assume the local format.

Regards,

-- 
Benoît Minisini




More information about the User mailing list