O'Reilly logo

A Programmer's Guide to .NET by Alexei Fedorov

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

5.3. Date and time support

The .NET Framework class library provides extensive support for dates and times by means of the following structures.

  • System.DateTime Structure Used to represent a date and time of day.

  • System.TimeSpan Structure Used to represent arbitrary time spans.

  • System.TimeZone Structure Provides support for multiple time zones and includes support for daylight saving time.

In the following sections we will look at these structures in more detail.

DateTime structure

This structure (value type) can be used to represent a date and time of day. It contains a number of methods to work with DateTime values. The DateTime represents dates and times that range between MinValue and MaxValue constants. The MinValue constant is 00:00:00 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required