Hi Tim,
Thanks for the reply. Seconds since the epoch does make a
good timestamp. Is that what is normally used to extract
data between time periods?
Say for example, I want to know for the past month what my
failure rate was between 11PM and 1AM every day. I'd figure
out what 11PM and 1AM is in seconds since the epoch for the
1st of the month and then for each of the next 30 days, then
figure out some SELECT statement to use that set of numbers.
It seems very convoluted.
Anyway, I have a feeling I'm asking this question in the
wrong place. I'm not sure this is a SQLite specific question
as the answer is probably going to be the same regardless of
the DBMS.
Thanks,
-Bill
On 9/15/2013 1:16 PM, Tim Streater wrote:
On 15 Sep 2013 at 18:13, William Drago <wdr...@suffolk.lib.ny.us> wrote:
All,
Should I put date and time in separate columns if I want to
select by time?
For example:
SELECT * FROM testresults WHERE (status != "Pass") AND
(23:00 <= testtime) AND (testtime <= 01:00).
I have been reading the documentation, but it just isn't
clear to me how I should handle this.
I convert everything to seconds since the epoch and have a column with that.
All comparisons are done against that value. This is not too difficult in PHP.
--
Cheers -- Tim
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 2013.0.3408 / Virus Database: 3222/6667 - Release Date: 09/15/13
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users