Re: A variant of the DateTime data type needed in VB.NET

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Jay B. Harlow [MVP - Outlook] (Jay_Harlow_MVP_at_msn.com)
Date: 02/26/05


Date: Sat, 26 Feb 2005 09:54:38 -0600

Cor,
> A datetime is actual a value that contains ticks from a certain start date
> (which differs by instance when it is from a server or is internally).
A datetime is actually a value that contains "100-nanosecond units called
ticks, and a particular date is the number of ticks since 12:00 midnight,
January 1, 1 A.D. (C.E.) in the GregorianCalendar calendar."

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfSystemDateTimeClassTopic.asp

Notice it explicitly states that it is an instace from a specific point of
time.

This should not be confused with Local Time & Universal Time. Universal Time
is based on GMT, while Local Time is based your current local. In both cases
the value is represented by "the number of ticks since 12:00 midnight,
January 1, 1 A.D. (C.E.)"

Hope this helps
Jay

"Cor Ligthert" <notmyfirstname@planet.nl> wrote in message
news:umCkDz9GFHA.580@TK2MSFTNGP15.phx.gbl...
> Alan,
>
> A datetime is actual a value that contains ticks from a certain start date
> (which differs by instance when it is from a server or is internally).
>
> You use methods to show that and to manipulate.
>
> One of them is
>
> DateTime.AddDays(-x), what is maybe the most properiate for you to use in
> a routine.
>
> Cor
>



Relevant Pages

  • Re: A variant of the DateTime data type needed in VB.NET
    ... A datetime is actual a value that contains ticks from a certain start date ... (which differs by instance when it is from a server or is internally). ...
    (microsoft.public.dotnet.languages.vb)
  • Re: DateTime Equals method & Ticks
    ... The converted DateTime is constructed as you say -- the individual ... SYSTEMTIME fields are individually used in the detailed constructor. ... from the individual constituent parts of Date1, ... Date1 Ticks: 632736001277068750 TOD.Ticks: 289277068750 ...
    (microsoft.public.dotnet.framework)
  • Re: DateTime Equals method & Ticks
    ... no DateTime constructor that allows you to provide the get-only Ticks ... I already have an Equals in my wrapper class that currently just delegates ...
    (microsoft.public.dotnet.framework)
  • Re: Serialization in Mono
    ... Parameter name: ticks ... suppose it's also possible that the exception output is incorrectly formatting the input value and that it's simply a genuine "your number is too big" exception. ... What I would do is take the maximum value described in the range and set a DateTime object to that to see what actual date and time that corresponds to. ... This may be because the Mono DateTime doesn't handle the same range as the .NET DateTime, it might be because of some sort of byte-swapping issue, it might be because of some data structure packing or alignment problem, or something else entirely. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: How to convert date to string value?
    ... the datetime is a value what is internaly as well as ... newsgroup telling that it was internally by Microsoft MM-dd-yyyy. ... and instead of intervals "ticks". ... it is not needed to give the format of that, ...
    (microsoft.public.dotnet.languages.vb)