Introduction


The Date data type holds a compact representation of an exact moment in time, with 100-nanosecond resolution, covering a 10,000-year span of dates starting with day 1 of year 1 AD. Visual Basic 2005 and the .NET Framework provide many powerful functions for working with dates and times, but the syntax and conceptual changes can be daunting, especially if you're updating your skills from VB 6. It can often be tricky to figure out how or what to use to get the job done.

The good news is that once you get up to speed with all the changes, it's now easier than ever to work with dates and times. Is a given year a leap year? How many days are there in a given month? What day of the year is a given date? All of these questions, and many more, can now be answered with single function calls or single lines of code.

The recipes in this chapter provide solutions for many of the common date and time calculations that come up in day-to-day development, and they should get you up to speed in "no time" (pun intended).




Visual Basic 2005 Cookbook(c) Solutions for VB 2005 Programmers
Visual Basic 2005 Cookbook: Solutions for VB 2005 Programmers (Cookbooks (OReilly))
ISBN: 0596101775
EAN: 2147483647
Year: 2006
Pages: 400

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net