Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Win32/Win64 API (native code) (https://www.delphipraxis.net/17-win32-win64-api-native-code/)
-   -   Delphi GetLocaleFormatSettings - Uhrzeit im 24 Stunden System (https://www.delphipraxis.net/132718-getlocaleformatsettings-uhrzeit-im-24-stunden-system.html)

Andreas L. 18. Apr 2009 00:02


GetLocaleFormatSettings - Uhrzeit im 24 Stunden System
 
Hi,
ich hole mir mit GetLocaleFormatSettings das Datums und Zeitformat für einen DateTimePicker:
Delphi-Quellcode:
var
  DTFormat: TFormatSettings;
  DTFormatStr: String;
begin
  GetLocaleFormatSettings(GetUserDefaultLCID, DTFormat);    
  DTFormatStr := DTFormat.ShortDateFormat + ' ' + DTFormat.LongTimeFormat;
  frmEditUnixTimeStamp.dtpValue.Format := DTFormatStr;
  ...
Leider wird mir die Uhrzeit aber im 12 Stunden System angezeigt und nicht wie in der Systemsteuerung eingestellt im 24 Stunden System. Woran könnte das liegen? Gibt es noch eine andere Möglichkeit einen Format-String zu bekommen?

Nächtliche Grüße,
Andreas

Andreas L. 22. Apr 2009 16:57

Re: GetLocaleFormatSettings - Uhrzeit im 24 Stunden System
 
*push*


Alle Zeitangaben in WEZ +1. Es ist jetzt 02:52 Uhr.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz