Microsoft Y2K  
Microsoft
 This static CD-based web site is representative of the www.microsoft.com/y2k site as of October 15, 1999.

Microsoft Year 2000 Readiness Disclosure & Resource Center
Developing Year 2000 Compliant Applications in Microsoft Visual Basic
10.  Conclusion

Use the following points as your basic rules for handling dates in your Visual Basic programs:

  • Always use the Date data type for holding and manipulating dates.
  • If you have to assign dates that lack century information, always use a known and documented algorithm for your interpretation or expansion of them.
  • Be aware of all of the leap year rules in any routines you write that manipulate dates.
  • Never manipulate dates as strings.
  • Wherever possible use Visual BasicÆs built-in date manipulation capabilities, which are many and varied.
  • Assume nothing.

Many developers are rather indifferent about Visual Basic year 2000 compliance, assuming that since the Date data type can store dates up to 9999, the language is fully compliant and they have nothing to worry about. Given that Visual Basic is one of the worldÆs most popular programming languages, this attitude is worrisome, to say the least. Not only must the language and environment be compliant, so must the programmers. Developer tools are like a loaded gun: TheyÆre only safe in the right hands. When used sensibly, it is easy to create fully compliant applications; unfortunately, writing noncompliant ones is even easier without education.

For More Information

For the latest information on Microsoft and the Year 2000, check out the Microsoft World Wide Web site at http://www.microsoft.com/year2000.

⌐ 1999 Microsoft Corporation. All rights reserved.

The information contained in this document represents the current view of Microsoft Corporation on the issues discussed as of the date of publication. Because Microsoft must respond to changing market conditions, it should not be interpreted to be a commitment on the part of Microsoft, and Microsoft cannot guarantee the accuracy of any information presented after the date of publication.

This White Paper is for informational purposes only. MICROSOFT MAKES NO WARRANTIES, EXPRESS OR IMPLIED, IN THIS DOCUMENT.

Microsoft, ActiveX, Visual Basic, Windows, and Windows NT are either registered trademarks or trademarks of Microsoft Corporation in the United States and/or other countries.

Other product or company names mentioned herein may be the trademarks of their respective owners.

Microsoft Corporation ò One Microsoft Way ò Redmond, WA 98052-6399 ò USA

0299

<< 1 2 3 4 5 6 7 8 9 10 >>


Send This To a Friend


 

Wednesday, April 14, 1999
1998 Microsoft Corporation. All rights reserved. Terms of use.

This site is being designated as a Year 2000 Readiness Disclosure and the information contained herein is provided pursuant to the terms hereof and the Year 2000 Information and Readiness Disclosure Act.