Chapter 2: Working with Dates and Times
Understanding how date/time values are stored in VBA
Using the built-in VBA date/time functions
Extending the built-in functions with new generalized procedures
This chapter is devoted to providing solutions to common problems involving date and time values, including manipulating date values, finding a particular date, and working with elapsed times. Although VBA supplies a rich set of functions that help you work with date/time values, their use can be confusing, and there are many programmatic questions that need to be answered that require functions other than those supplied by the built-in VBA date-handling functions.
Table 2.1 lists the sample files you'll find on the accompanying CD-ROM.
Table 2.1: Sample Files
File Name | Description |
DATETIME.XLS | Excel 97 file with sample functions |
DATETIME.MDB | Access 97 database with sample functions |
DATETIME.BAS | Text file with sample functions |
HOLIDAYS.MDB | Access 97 database containing tblHolidays |
HOLIDAYS.TXT | Exported text version of tblHolidays |