You can use SQLite for this purpose (instead of C) as described in
http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions.
I don't use C under Microsoft so I can't help you there (I only use C under
Linux).
I do know that making Jan 1, 1970 00:00:00 the same as 0 seconds, you could
write your own C subroutine to convert from DHMS2SEC (i.e. from Gregorian
hour minute seconds) to seconds and viceversa, SEC2DHMS.

Regards,

[EMAIL PROTECTED]
NCCI
Boca Raton, Florida
561.893.2415
greetings / avec mes meilleures salutations / Cordialmente
mit freundlichen Grüßen / Med vänlig hälsning


                                                                       
                      "[EMAIL PROTECTED]                                
                      co.ca" <mqlin            To:       sqlite-users@sqlite.org
                                               cc:                     
                      02/21/2005 06:09         Subject:  Re: [sqlite] What is 
the best way to store date value in sqlite
                      PM                                               
                      Please respond to                                
                      sqlite-users                                     
                                                                       
                                                                       




Anyway get get Unix Epoch Time in Windows MFC, or win32?

[EMAIL PROTECTED] wrote:

>
>
>Ming:
>I asked the same question about two weeks ago to this same list.  I was
>directed to the following location:
>
>http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions
>
>I ended up saving my date/time in Unix Epoch Time.  Then you can retrieve
>with the datetime function   SELECT datetime(column-name,'unixepoch') from
>table-name.  I use perl under Unix so I actually convert to Unix Epoch
>format before updating table.
>
>Regards,
>
>[EMAIL PROTECTED]
>NCCI
>Boca Raton, Florida
>561.893.2415
>greetings / avec mes meilleures salutations / Cordialmente
>mit freundlichen Grüßen / Med vänlig hälsning
>
>
>

>                      "[EMAIL PROTECTED]

>                      co.ca" <mqlin            To:
sqlite-users@sqlite.org

>                                               cc:

>                      02/21/2005 05:29         Subject:  [sqlite] What is
the best way to store date value in sqlite
>                      PM

>                      Please respond to

>                      sqlite-users

>

>

>
>
>
>
>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.
>
>Many thanks,
>
>Ming
>
>
>
>
>
>
>




Reply via email to