Not correct (fully) - the CTime class does have this limit, but not
COleDateTime (quote from MSDN: "The COleDateTime class handles dates
from 1 January 100 - 31 December 9999.") And you can access the double
using COleDateTime::m_dt member variable.

For comparison it's best to use GetYear(), GetMonth(), GetDay(),
GetHour(), GetMinute(), GetSecond() functions - that's true.

   Dennis

-----Original Message-----
From: Jay [mailto:[EMAIL PROTECTED] 
Sent: Tuesday, February 22, 2005 12:55 PM
To: sqlite-users@sqlite.org; [EMAIL PROTECTED]
Subject: Re: [sqlite] What is the best way to store date value in sqlite

The MFC date is stored as a floating point number, the unix date as a
long integer. The MFC style date, used through out windows has a maximum
date of somewhere around 2038AD. The unix variant goes several thousand
years farther.

You could certainly store the float date as a float type field but none
of the date functions built into the sqlite engine would work with them.
The unix variant will work with sqlite functions.

Also, be aware that due to rounding of MFC dates you will occasionally
get cases where dates that appear identical will not match because of
floating point precision and Microsoft display routines that do not
display fractional seconds.

--- "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote:

> Hi All,
> 
> I want to store MFC date (CTime or COleDateTime) value in sqlite, but
> 
> don't know what is the best way to store it. I am running into trouble

> when I store date as Text in sqlite, because I can't no longer apply 
> sqlite date time functions( datetime(), date()...) to it. Result in I
> 
> can't do a order by the date filed.
> 
> The other question would be does sqlite have date limits (Upper Bound
> 
> and Lower Bound) for the datetime() functions.
> 


=====

---------------------------------

"Lord Tarlington gazed upon the crazed Egyptian hieroglyphics on the
walls of the ancient tomb of the petrified pharaoh, he vowed there would
be no curse on him like on that other Lord, unless you count his
marriage to Lady Tarlington who, when the lost treasure was found, will
be dumped faster than that basket in the bulrushes."
  Melissa Rhodes
---------------------------------

The Castles of Dereth Calendar: a tour of the art and architecture of
Asheron's Call
http://www.lulu.com/content/77264


                
__________________________________
Do you Yahoo!? 
Yahoo! Mail - Helps protect you from nasty viruses. 
http://promotions.yahoo.com/new_mail




Reply via email to