Igor Tandetnik wrote:
> Myk Melez <[EMAIL PROTECTED]> wrote:
>> I noticed today that JavaScript Date values (the number of
>> milliseconds since the Unix epoch) degrade to second precision when
>> converted to Julian date values and back using naive SQLite date/time
>> function calls, for example:
>>
>> sqlite> SELECT strftime('%s', julianday(1219441430151/1000,
>> 'unixepoch')) * 1000;
>> 1219441430000
>>
>> I suppose this is because "Unix has no tradition of directly
>> representing non-integer Unix time numbers as binary fractions."
> 
> No. You have two problems. First, 1219441430151/1000 is done as C-style 
> integer truncating division, so you are losing your fractions right 
> there. Try
> 
> select 1219441430151/1000, 1219441430151/1000.0;

Did I do something wrong?

SQLite version 3.5.9
Enter ".help" for instructions
sqlite> select 1219441430151/1000, 1219441430151/1000.0;
1219441430|

I don't get a result for the second select...

-- 
Scott Baker - Canby Telcom
RHCE - System Administrator - 503.266.8253
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to