Microsoft® .NET Compact Framework (Core Reference)
by Andy Wigley, Stephen Wheelwright, Robert Burbidge, Rory MacLoed, Mark Sutton
Using Dates
The DateTime structure in the .NET Compact Framework implements dates. A DateTime structure holds date values accurate to one tick (100 nanoseconds). Dates are held relative to a start date of 12:00 midnight, January 1, 1 A.D. (also known as C.E. or Common Era). Dates are immutable, which means that any operations to modify a date will actually return a new instance of a date. This has performance implications when performing many date operations.
DateTime objects hold absolute date and time values. A TimeSpan object, frequently used with dates, holds a relative time or a time interval. The date arithmetic code examples in the following subsections examine the use of TimeSpan objects. The DateTime and TimeSpan structures are defined ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access