1. Home
  2. Computing & Technology
  3. Delphi Programming

Date/Time and other International settings

By Zarko Gajic, About.com

By default, Delphi gets its date/time, currency and numeric format from Control Panel's International settings.
We can set the constants defined in Delphi, like DecimalSeparator, ShortDateFormat and others like in the code below. To a complete list of these variables, look at Currency and date/time formatting variables in Delphi Help.

~~~~~~~~~~~~~~~~~~~~~~~~~
procedure SetLocale;
begin
  DecimalSeparator := '.';
  ThousandSeparator : = ',';
  ShortDateFormat := 'mm/dd/yy';
end;
~~~~~~~~~~~~~~~~~~~~~~~~~

Delphi tips navigator:
» Window flashing
« ToolTip font hint properties

Zarko Gajic
Guide since 1998

Zarko Gajic
Delphi Programming Guide

Explore Delphi Programming
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. Delphi Programming
  4. Coding Delphi Applications
  5. Delphi Tips and Tricks
  6. 1999 Delphi Tips
  7. Date/Time and other International settings

©2009 About.com, a part of The New York Times Company.

All rights reserved.