Board index » cppbuilder » TDateTime Int function

TDateTime Int function

Does anyone know the format of the int that gets passed to

__fastcall TDateTime(const int src)

Creates a TDateTime object from an int.

Or is returned from

__fastcall operator int() const;

Returns an int that is the integer conversion of  this TDateTime object.

Thanks

--
Brian Moravecky
Senior Software Engineer
Sun Nuclear Corporation

 

Re:TDateTime Int function


Quote
Brian Moravecky wrote:

> Does anyone know the format of the int that gets passed to

> __fastcall TDateTime(const int src)

> Creates a TDateTime object from an int.

> Or is returned from

> __fastcall operator int() const;

> Returns an int that is the integer conversion of  this TDateTime object.

I believe that in both cases it's the integer portion of the internal
floating-point value - or in other words the number of days since the base
date, which is supposed to be 12/30/1899 for some obscure reason.  So
calling it like this:

TDateTime foo = TDateTime(1);

would give 'foo' a value of "1/1/1900 00:00:00".  At least that's what the
helpfiles seem to say :)

--
Corey Murtagh
The Electric Monk
"Quidquid latine dictum sit, altum viditur!"

Re:TDateTime Int function


Quote
Corey Murtagh wrote:

> date, which is supposed to be 12/30/1899 for some obscure reason.  So
> calling it like this:

> TDateTime foo = TDateTime(1);

> would give 'foo' a value of "1/1/1900 00:00:00".  At least that's what the

One of those two dates really should be 12/31/1899, I hope...
 - Leo

Re:TDateTime Int function


Thanks. The more I read in other areas of the help file, I came to the same
conclusion. Of course the help on that particular item is clear as mud.

Quote
> One of those two dates really should be 12/31/1899, I hope...

Thats a free day to do what ever you want. :)

--
Brian Moravecky
Senior Software Engineer
Sun Nuclear Corporation

Quote
Leo Siefert <lsief...@senate.state.mi.us> wrote in message

news:3940ED77.DE7A601F@senate.state.mi.us...
Quote
> Corey Murtagh wrote:

> > date, which is supposed to be 12/30/1899 for some obscure reason.  So
> > calling it like this:

> > TDateTime foo = TDateTime(1);

> > would give 'foo' a value of "1/1/1900 00:00:00".  At least that's what
the

>  - Leo

Other Threads