On Fri, 2 Jan 2015 16:12:23 -0800
J Decker <d3c...@gmail.com> wrote:

> I understand it's kept as a string... 

It might be more helpful to think of it not in terms of how it's "kept"
but as what its type is.  How it's kept is up to the DBMS to decide.
But the column is of a type: one of text, integer, and double.  Even
though that type isn't enforced in SQLite, it creeps in from time to
time.  You're comparing two values whose type is 'text', and that's how
they're being compared.  

> and there's no internal functions for this

There are in fact several functions, as you know, among them 
datetime().  (I consider them "internal", since they come with the
base system.)  Once you use one to convert your strings to another type
-- perhaps datetime -- then you're not comparing strings anymore.  

ISTM what you really want is to define the column as a datetime type,
regardless of how it's "kept", so that comparisons would be based on
the represented time, not as strings.  That's not a feature of SQLite.  

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

Reply via email to