Language: Using DateTime & TimeSpan types

Demonstrates the DateTime and TimeSpan classes.

Featured Highlights

Allows you to interactively work with most of the properties and methods of the DateTime and TimeSpan classes. 

Requirements

Requires the Trial or Release version of Visual Studio .NET Professional (or greater).

Running the Sample

Some demonstrations require you to supply values (the DateTime Shared Members page, for example). By default, the values in the text boxes are arbitrary values. Enter values into the appropriate text boxes, then click the page's Refresh button to run the corresponding method and refill the Label controls displaying the results. The code pulls its parameter value(s) from the text box(es). See the code to determine how the various methods use the parameters supplied by the text boxes. The TimeSpan Properties tab allows you to calculate TimeSpan values in two ways: either specifying a range of values, or by parsing a String containing a representation for a TimeSpan value. Select the tab you want to try, enter values, and then click the Calculate button. 

Last Update: 7 July 2002