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

Re: formating a german time string, using LANG=C LC_ALL=C gambas3


Am 24.11.26 um 10:59 schrieb Benoît Minisini:
Le 23/11/2026 à 23:59, Karl Reinl a écrit :
Am Montag, dem 23.11.2026 um 17:48 +0100 schrieb Claus Dietrich:
The date format of the locale C is "month/day/year". So you should
use

Format(Val("07/14/1789"), "yyyymmdd")

Best regards, Claus

Am 22.11.26 um 10:26 schrieb Charlie Reinl:
Salut,

Format(Val("14.07.1789"), "yyyymmdd")

if I ran the IDE in german this works fine.
But stared the IDE with "LANG=C LC_ALL=C gambas3"
I get, "Type mismatch: wanted Float, got Null instead"


Salut Claus,

yes I know/understand,but I switch to "LANG=C LC_ALL=C" to make it easy
to Benoît to read the output.
But I don't understand why a string of a date can't be converted to a
value, because the language has changed. Do we need a CultureInfo like
MS use it?

By using "LANG=C LC_ALL=C", you switch to American English. "14.07.1789" is not a date in English, hence the error message.

Regards,

--
Benoît Minisini.

Hi Benoît

I provided a similar answer, but this doesn't seem to be Charlies point.

To make it more clear: Why don't we have a string-to-date conversion available, which tells the converter how the string has to be read (German date format, French date format ....) ?

i.e. DVal("14.07.1789", "de")

Best regards, Claus


Follow-Ups:
Re: formating a german time string, using LANG=C LC_ALL=C gambas3Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>
References:
formating a german time string, using LANG=C LC_ALL=C gambas3Charlie Reinl <Karl.Reinl@xxxxxxxxxx>
Re: formating a german time string, using LANG=C LC_ALL=C gambas3Claus Dietrich <claus.dietrich@xxxxxxxxxx>
Re: formating a german time string, using LANG=C LC_ALL=C gambas3Karl Reinl <karl.reinl@xxxxxxxxxx>
Re: formating a german time string, using LANG=C LC_ALL=C gambas3Benoît Minisini <benoit.minisini@xxxxxxxxxxxxxxxx>