Not a hack, but the traditional way to store dates and times.  Sqlite 
functions use a magic epoch which facilitates the presentation of the 
date and time in the form of the major calendars.

We do not use the Julian calendar these days.  It was supplanted by the 
Gregorian in 1582.  Julian refers to defining a date by offset from an 
epoch and is the preferred method of storing date and time.

sqlfan wrote:
> is this just your "hack" or the standard way to do this?  I don't need it to
> be floating point, since I'm not interested in "when" during the day.  and,
> to be clear, "julian" is the calendar we all use, right? it's completely 1:1
> with the ansi format 2008-04-05 that I mentioned, right?
> 
> Thank you.
> 
> 
> Dennis Cote-2 wrote:
> 
>>sqlfan wrote:
>>
>>>I'm very new to sqlite but I notice there is no way to mark a column as
>>>containing dates... What is the standard way to do operations with dates,
>>>please, and to store dates?  Should I try the format 20080405 and do my
>>>own
>>>calculations using my language's standard library?  (I'm using Python) or
>>>is
>>>there a better way to store dates?  Thank you for all your help.  I'm
>>>very
>>>new to all this.
>>>  
>>
>>See http://www.sqlite.org/cvstrac/wiki?p=DateAndTimeFunctions for info 
>>on date and time functions.
>>
>>I would suggest storing dates as floating point julian day numbers.
>>
>>HTH
>>Dennis Cote
>>_______________________________________________
>>sqlite-users mailing list
>>sqlite-users@sqlite.org
>>http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>>
>>
> 
> 

_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to