1. Home
  2. Computing & Technology
  3. Visual Basic

Chapter 4 - Working With Menus and Dialog Boxes - Part 2

By Dan Mabbutt, About.com

1 of 5

Dates and Times - They're objects too!

Clocks

There's a lot more to dates and times. Chapter 4 just skims the surface.

The table on page 105 (gray box) gives you a series of easy-to-use properties and functions for dates and times. When they fit, Use Them! But you will probably run into situations where they DON'T fit.

Don't worry, the rich collection of objects in the .NET Framework will come to your rescue!

For example, consider the way dates and times are handled in Excel. Excel stores dates as sequential numbers starting January 1, 1900. Excel stores times as decimal fractions because time is considered a portion of a day. This makes it easier for Excel to use dates and times in calculations. For example, in Excel, 12 noon at January 1, 2000 would be expressed internally as ...

36526.50000000

That's 36,526 and a half days after January 1, 1900.

Index: Chapter 4 - Working With Menus and Dialog Boxes - Part 2

  1. Dates and Times - They're objects too!
  2. More on Date Data Types
  3. Add a little color to your programming!
  4. Back to Colors ...
  5. Representing Colors in Code

1 of 5

Explore Visual Basic

More from About.com

  1. Home
  2. Computing & Technology
  3. Visual Basic

©2008 About.com, a part of The New York Times Company.

All rights reserved.