Re: Date Variable
- From: "Rick Rothstein [MVP - Visual Basic]" <rickNOSPAMnews@xxxxxxxxxxxxxxxxx>
- Date: Tue, 27 Sep 2005 09:10:31 -0400
> > I'm not sure exactly what you are asking here. Why do you
think it
> > would be any different than assigning a value to a date at any
> > other time within your program? Perhaps if you explained what
you
> > are after in a little more detail, we might be able to give
you a
> > better answer.
> >
> I'm sorry how do initialize a date variable to have no value?
You can't; there is no such thing as a Date without a value. A
Date variable is initialized by VB as the "zero-date" which is
December 30, 1899. Dates are stored as (but they are not actually)
Double values, so the zero-date actually has a value of 0; but,
since it is of type Date, the system will interpret that as
December 30, 1899. Just so you know, the integer part of the
Double used to hold date values stores the number of days passed
from date-zero (positive is after date-zero, negative is before
date-zero) and the fraction part of the Double stores the time
part of the date (number of hours past midnight divided by the 24
hours in a day).
Rick
.
- Follow-Ups:
- Re: Date Variable
- From: Joel
- Re: Date Variable
- References:
- Date Variable
- From: Joel
- Re: Date Variable
- From: Rick Rothstein [MVP - Visual Basic]
- Re: Date Variable
- From: Joel
- Date Variable
- Prev by Date: Re: SSTab - TabStrip
- Next by Date: Re: VB serial comms programming
- Previous by thread: Re: Date Variable
- Next by thread: Re: Date Variable
- Index(es):