Store them as float or do integer and multiple by a power of 10 to get as many 
digits as you want.



So 1.234 seconds *10^3 can be 1234 integer







Michael D. Black

Senior Scientist

Advanced Analytics Directorate

Advanced GEOINT Solutions Operating Unit

Northrop Grumman Information Systems

________________________________
From: sqlite-users-boun...@sqlite.org [sqlite-users-boun...@sqlite.org] on 
behalf of Nico Williams [n...@cryptonector.com]
Sent: Tuesday, April 17, 2012 1:44 PM
To: General Discussion of SQLite Database
Subject: EXT :Re: [sqlite] Slightly unexpected behaviour when comparing date 
and datetime

On Tue, Apr 17, 2012 at 11:18 AM, Mark Jones <m...@jonesgroup.co.uk> wrote:
> I think I'll spend the time going back and storing the dates as integer
> time (since the epoch) as Nico suggested and just use strftime to convert
> them as and when required.

Note that you'll lose any fractional second information when you do
this.  On the other hand, fractional second information does not sort
properly when compared as text, so if you need sub-second resolution
you need to work a little harder.

(Huh, that is strange.  Is there a canonical way to compare timestamps
with fractional seconds in SQLite3?)
_______________________________________________
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