BUG: Omitting Year for DateValue May Give Unexpected Results (84115)
The information in this article applies to:
- Microsoft Visual Basic Standard Edition for Windows 2.0
- Microsoft Visual Basic Standard Edition for Windows 3.0
- Microsoft Visual Basic Professional Edition for Windows 2.0
- Microsoft Visual Basic Professional Edition for Windows 3.0
- Microsoft Visual Basic Standard Edition for Windows 1.0
This article was previously published under Q84115 SYMPTOMS
If you omit the year portion of the DateValue function argument,
DateValue uses the current year from the computer's system date.
However, if you also pass an invalid day for the month, DateValue
interprets the month as the year and the day will default to 1. For
example, 3/30 will be interpreted as 3/30/92, but 3/44 will not
produce an error message, and will be interpreted as 3/1/44.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article. We are researching this problem and will
post new information here in the Microsoft Knowledge Base as it becomes
available.
Modification Type: | Major | Last Reviewed: | 12/12/2003 |
---|
Keywords: | kbbug KB84115 |
---|
|