Re: [sqlite] Precision of dates stores as Julian real

2007-02-23 Thread Ralf Junker
So make the wiki available for download. ;) I would like this too. ;) Often I'm working without an internet connection and a having a local copy of the Wiki would be extremely useful. Been working on this for years. Literally. I just never seem to find the time to complete the

Re: [sqlite] Precision of dates stores as Julian real

2007-02-22 Thread drh
McDermott, Andrew [EMAIL PROTECTED] wrote: Hi, [EMAIL PROTECTED] wrote: Guess you can't please everybody :-) Right now we have some documentation in the source tree and some on the wiki, which I suppose is guaranteed to please nobody. So make the wiki available for

Re: [sqlite] Precision of dates stores as Julian real

2007-02-21 Thread Dennis Cote
[EMAIL PROTECTED] wrote: This isn't a bug. The magic current_timestamp keyword is really an alias for datetime('now'). And datetime('now') returns you a text string in the format YY-MM-DD HH:MM:SS. Yes, this means that the seconds have been rounded to the nearest whole second. But that is

Re: [sqlite] Precision of dates stores as Julian real

2007-02-21 Thread drh
Dennis Cote [EMAIL PROTECTED] wrote: The problem is that you can't use a function like strftime as the default value for a column when you create a tbale. It only accepts NULL, a string constant, a number, or one of the magic current_* values. Sure you can. You just have to put the

Re: [sqlite] Precision of dates stores as Julian real

2007-02-21 Thread P Kishor
On 2/21/07, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote: Dennis Cote [EMAIL PROTECTED] wrote: The problem is that you can't use a function like strftime as the default value for a column when you create a tbale. It only accepts NULL, a string constant, a number, or one of the magic current_*

Re: [sqlite] Precision of dates stores as Julian real

2007-02-21 Thread drh
P Kishor [EMAIL PROTECTED] wrote: is it possible to add usage such as the above, and many, many wonderful SQL suggestions routinely provided by Igor Tandetnik (thanks Igor!) to the syntax docs in the form of user-submitted comments? I was trying to move all of the documentation into wiki

Re: [sqlite] Precision of dates stores as Julian real

2007-02-21 Thread Dennis Cote
[EMAIL PROTECTED] wrote: Sure you can. You just have to put the expression in parentheses (to avoid a parsing conflict). Try this: CREATE TABLE test1( date TEXT DEFAULT (strftime('%Y-%m-%d %H:%M:%f', 'now')), dummy int ); INSERT INTO test1(dummy) VALUES(1); SELECT

Re: [sqlite] Precision of dates stores as Julian real

2007-02-21 Thread Martin Jenkins
[EMAIL PROTECTED] wrote: Guess you can't please everybody :-) Right now we have some documentation in the source tree and some on the wiki, which I suppose is guaranteed to please nobody. So make the wiki available for download. ;) Martin

[sqlite] Precision of dates stores as Julian real

2007-02-20 Thread Tom Olson
Hello, I know that SQLite uses a 64-bit floating point type to store Julian date information. Is this accurate to the second or a fraction of a second? I was doing some testing and tried to format a date using strftime() method with the %f option and I was unable to find a date that kept any

Re: [sqlite] Precision of dates stores as Julian real

2007-02-20 Thread drh
Tom Olson [EMAIL PROTECTED] wrote: Hello, I know that SQLite uses a 64-bit floating point type to store Julian date information. Is this accurate to the second or a fraction of a second? I was doing some testing and tried to format a date using strftime() method with the %f option and I

Re: [sqlite] Precision of dates stores as Julian real

2007-02-20 Thread Joe Wilson
--- [EMAIL PROTECTED] wrote: A double is sufficient to store the current time to with about 25 microseconds. If you use 'now' to get the current time, the date functions try to capture the current time to this precision. That is implemented in the os_XXX.c layer. It's system dependent.