On 28 Dec 2009, at 5:06pm, Israel Brewster wrote:

> Or perhaps  
> some other way to extract the time of a timestamp that works in all  
> three databases?

Sorry.  Each database handles time/date information differently (there's no SQL 
standard for doing it).  You will fail to find one function that returns a 
useful result in all three SQL engines.  I recommend that you use an agnostic 
way of storing your datestamps in the database, for instance as a TEXT field in 
the format

yyyymmdd                (if you need just a date)
hhmmss                  (if you need just a time)
yyyymmddThhmmss         (the date, then a 'T', then the time)

All of these formats are easy to recognise and sort and index correctly.  Write 
library routines in your software which converts from your programming 
language's date representation to and from this representation.  This way you 
need write just one routine and that routine /will/ work for all three SQL 
engines.

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

Reply via email to