XL97: Format Function May Return an Incorrect Date (172588)
The information in this article applies to:
- Microsoft Excel 97 for Windows
This article was previously published under Q172588 SYMPTOMS
In Microsoft Excel, if you run a Visual Basic for Applications macro
that uses the Format function with a date, you may notice the following
problems:
- When you use the General Date format or the Short Date format, the
month, day, and/or year of the dates may be switched.
For example, although the date January 10, 1997 may appear in the cell
as 1/10/97, the actual value of the date is October 1, 1997 (10/1/97).
- When you use the General Date format or the Short Date format, some of
the dates appear as text not as valid dates.
This problem may occur if the day or year of a date is greater than 12.
For example, the date July 30, 1997 may appear in the cell as the text
string "30/07/97" instead of the date 30/07/97.
- When you use the Long Date format, dates may appear in the Medium Date
format instead.
For example, if the date should appear as "Tuesday, August 12, 1997", it
may appear as 12-Aug-97 instead.
CAUSE
These problems may occur if you are using regional settings that use a date
order of either day-month-year or year-month-day.
STATUS
Microsoft has confirmed this to be a problem in Microsoft Excel 97.
Modification Type: | Minor | Last Reviewed: | 10/11/2006 |
---|
Keywords: | kbdtacode kbprb KB172588 |
---|
|