PC SOFT

FOROS PROFESIONALES
WINDEVWEBDEV y WINDEV Mobile

Inicio → WINDEV 2024 → [WD19] DatetoString in a stored procedure - nation()
[WD19] DatetoString in a stored procedure - nation()
Iniciado por guest, 30,mar. 2015 12:42 - 10 respuestas
Publicado el 30,marzo 2015 - 12:42
Hi,

I use datetostring(....,"MMMM YYYYY") to create the name of the month in a stored procedure,
I use nation(nationgerman) to set the language to german.

Both is allowed in SP. But the names of the month still are in english ?

Any ideas ?
Publicado el 30,marzo 2015 - 13:30
Hi Michael

By Default, WD "knows" English for the US version and French for the French version. Any information in any other language HAS to come from YOU...

In the case of the name of the month, I think that you can change them in the project settings, in the language>date part...

If THAT doesn't work, then it means it's part of one of the DLL, and has to be changed with wdInt

Best regards
Publicado el 30,marzo 2015 - 13:39
Hi Fabrice,

that could not be because my desktop application knows the german month names (I don´t put them in)


Its the same project, the same analysis and (in the test case) the same computer ...
Publicado el 30,marzo 2015 - 14:40
Hi Michael

hmmmm...

Now I'm wondering...

1. In your project, you have the german language set up, which means that the settings I was talking about for dates are set (names of the month, etc)

2. Now, everything that is global to the project is stored in the wdp file

3. I doubt that your stored procedure include the content of the wdp file...

So you should ask pcsoft about it, because it looks like a catch 22 to me

Best regards
Publicado el 30,marzo 2015 - 14:47
Ok,

I will do this (but I am afraid that I am number one on the pc-soft-black-user-list). :joke:

regards
Publicado el 30,marzo 2015 - 15:33
Hi Michel

Maybe try this:

DateToMonthInAlpha(Dagboekmutaties.Datum) this geves you the name of the month of a certain date. It takes the language of your project

regards

Allard
Publicado el 30,marzo 2015 - 20:24
Hi,

unfortunately its the same like in datetostring() .....
Publicado el 30,marzo 2015 - 23:36
Michael

Not sure the below link could be a help or not:

<a class="ExternalLink" rel="nofollow" target="_blank" href="http://help.windev.com/en-US/?3054012">http://help.windev.com/en-US/&hellip;</a>

HTH

King
Publicado el 31,marzo 2015 - 10:27
Hi King,

mhh, that looks like a way to include own *.wdm files with specific language attributes like errror messages.
In my case I need the access to (built-in) german month names or (like in the project settings configured) the system settings from the OS.
Publicado el 01,abril 2015 - 10:11
Hi Michael,

You can code something quick and dirty that will do the job or overload the DateToString function with additional parameters (language) and code something like this:
SWITCH pNation
CASE German:
...(replace(replace(replace(replace(WL.DateToString(....,"MMMM YYYYY"),"January","Januar"),"February","Februar"),"March","Marz"),...)
OTHER CASE:
...
END

Recently I also had a similar call with support about:
ChangeSeparator(sepDECIMAL,".") and ChangeSeparator(sepTHOUSAND,".")
for an international webdev app of us...
Unfortunately after having changed the separators by calling the above standard WL functions, NumToString() wouldn't take these separators into account...
Reply from PCSoft: works as designed, so we had to overload the standard NumToString function...

Greetz,

Peter
Publicado el 01,abril 2015 - 14:56
Hi Pete,

yes, in my case PC soft also wrote that language functions in stored procedures are not supported, so I came to the same solutions as your.