Date, Time, Currency Formats Different from InternationalLast reviewed: July 29, 1997Article ID: Q114628 |
The information in this article applies to:
SYMPTOMSWhen you run a macro that formats a number with a date, time, currency, or standard number format in a Visual Basic, Applications Edition module, the format in the macro is different from the format displayed in the International dialog box of Control Panel. This behavior occurs when your Country setting in the International dialog box is set to one of the following: Austria, Canada (French), Hungary, Slovak Republic, Croatia, Romania, Serbia, or Slovenia. The following is a list of Country settings and the different date formats displayed in the International dialog box of Control Panel and in a Visual Basic module:
Country International Visual Basic displays displays -------------------------------------------------------------------- Austria Short Date: 1994-5-6 1994-5-Friday Canada (French) Short Date: 94/5/6 94-5-6 Hungary Long Date: 1994. May 6 1994 May 6. Short Date: 1994.5.6 1994.5.6.When the following country settings are used
Croatia Romania Serbia Sloveniaa macro in a Visual Basic module displays date, time, currency, and numbers as United States formats.
CAUSE
AustriaThis incorrect date format is caused by a problem in Microsoft Windows. When you set the Country setting to Austria in the International dialog box, the [intl] section of the WIN.INI file has the following incorrect setting:
sShortDate=yyyy-MM-ddddThis causes the date in Visual Basic modules to be formatted with the full day name.
Canada(French)This incorrect date format is caused by a problem in Microsoft Windows. The [intl] section in the WIN.INI file has the following inconsistent settings:
sDate=/ sShortDate=yy-mm-ddThe date separators in these settings should be consistent. (The default should be the hyphen (-) character.)
HungaryThis incorrect date format is also caused by a problem in Microsoft Windows. In the [intl] section in the WIN.INI file, both the sShortDate and the sLongDate settings correctly show a period at the end. The Visual Basic module uses these correct settings to format a date. In this case, the format of the dates in the International dialog box are incorrect.
Croatia, Romania, Serbia, and SloveniaVisual Basic, Applications Edition does not recognize the Croatia, Romania, Serbia, and Slovenia system locales. For languages that are not recognized, date, time, currency, and number formats in Visual Basic modules use the default United States/English International settings. More information about this is available in the XLREADME.HLP file. To view this file, do the following:
WORKAROUND
AustriaTo work around this problem and display the correct short date format in a Visual Basic module, do the following:
Canada(French)To correct this inconsistency, do the following:
Keywords : kbprg kbusage Version : 1.00 Platform : WINDOWS |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |