🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.cppbuilder.nativeapi
3 messages
3 total messages Started by Thom A. Thu, 30 Nov 2006 19:53
FormatDateTime in German ???
#2839
Author: Thom A.
Date: Thu, 30 Nov 2006 19:53
17 lines
1528 bytes
Good evening!

I have built a program on a computer with a German Windows installation. 
This program, run on an English installation of Windows, calls 
FormatDateTime with the ddd option, which returns the abbreviation of 
the respective week day's name, e.g. Thu for Thursdays.

Now I'd like to know, why FormatDateTime always returns the German 
abbreviation, no matter which computer on this planet it is called on. 
On a US American machine with English Windows it always returns Do 
(Donnerstag) for Thursday!

To be quick: I have NOT touched the ShortDateFormat or LOCALE_SSHORTDATE 
variables!

Greetings,
Thom
Re: FormatDateTime in German ???
#2840
Author: Remy Lebeau (TeamB)
Date: Thu, 30 Nov 2006 21:10
26 lines
1799 bytes
"Thom A." <thoma@gmx.at> wrote in message
news:456f3699@newsgroups.borland.com...

> Now I'd like to know, why FormatDateTime always returns
> the German abbreviation, no matter which computer on this
> planet it is called on.

'ddd' uses the global ShortDayNames array for the actual string values.
Those string values are initialized using LOCALE_SABBREVDAYNAME 1-7, falling
back to localized string resources if they are not available from the OS.

> On a US American machine with English Windows it always returns Do
> (Donnerstag) for Thursday!

The only way I can see that happening is if the OS does not provide any
string values, so the VCL falls back to its own resources, which are
compiled with German strings in the English stringtable.

> To be quick: I have NOT touched the ShortDateFormat or
> LOCALE_SSHORTDATE variables!

Those have nothing to do with this issue.


Gambit
Re: FormatDateTime in German ??? -- solved
#2812
Author: Thom A.
Date: Fri, 29 Dec 2006 05:42
10 lines
1262 bytes
Here's the solution:

The component I used called the FormatDateTime(...) routine not at 
run-time, but at design-time, and then stored the value instead of 
reformatting it.

Strange idea.....


Thomas
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads