To format dates, times, and currency, you can use a variety of formatting techniques. You can:
Allow Visual FoxPro to use the settings established in the Control Panel.
Specify a language or a specific format in the Visual FoxPro Options dialog box that you want to use.
Format dates, times, and currency information in code.
To set a format for dates, times, and currency
From the Tools menu, choose Options, and then click the Regional tab.
To use the settings made with the Windows Control Panel, choose Use system settings.
Choose a language or format for dates and times and then choose options for formatting currency and numbers.
NoteВ В В If you choose the format Short or Long for the date format, you cannot specify any further options for the date format, and the settings are read from the Windows Control Panel.
Choose OK to use the options for this session, or Set As Default to make the changes the default settings for this copy of Visual FoxPro.
You can also use the SET SYSFORMATS Command and SET DATE Command. As a rule, you would issue this command during the initialization of your application (for example, in the configuration file). The default for SET SYSFORMATS is OFF, so you must explicitly set it to ON when starting your application.
You can establish data validation in individual text boxes by setting the Format Property of the text box. Note that text box formatting takes precedence over system-wide formatting.