How to Change the Date Format for Databases

To change the date format you have to launch the BDE Administrator and set the data separator and the preferred date format. This is set in a different way the standard Windows regional settings so you may want to look up the BDE help. Then use the following code in your project source file:

...
uses
  SysUtils;
...
  Application.Initialize;
  { Have to do this right away }
  Application.UpdateFormatSettings := False;
  DateSeparator := { The date format separator }
  ShortDateFormat := { The short date format separator }
  LongDateFormat := { The long format separator }
...

Tags: , , , , , , , , , , , , , , , , , ,

No Comments Yet

You can be the first to comment!

Leave a comment

OpenID Login

Standard Login