Dr. H,

Thank you for the reply.  I ran the select statement you sent me as well as
testing it with 'now' and both do indeed show the fractional seconds,
however if I use current_timestamp I do not see the fractional seconds. 
using 'now' should suffice as a workaround.  Curious though?

Kind Regards,

Tom


drh wrote:
> 
> 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 was unable to find a date that kept any
>> millisecond
>> information and after reviewing the date.c file it does not appear to
>> capture anything more accurate than a second.  Is this correct?
>> 
> 
> 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.
> Check to see what your system is doing.
> 
> If you enter the date in ISO8601, it captures up to milliseconds.
> Ex:
> 
>    SELECT strftime('%Y-%m-%d %H:%M:%f', '2001-09-11 09:32:42.437');
> 
> This works for me.  I see the full ".437" at the end.  Are you
> saying that you do not?
> --
> D. Richard Hipp  <[EMAIL PROTECTED]>
> 
> 
> -----------------------------------------------------------------------------
> To unsubscribe, send email to [EMAIL PROTECTED]
> -----------------------------------------------------------------------------
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Precision-of-dates-stores-as-Julian-%22real%22-tf3264210.html#a9079775
Sent from the SQLite mailing list archive at Nabble.com.


-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to