python - Sqlite: How to select a value from a table where function(value) is another certain value? -
i have table consisting of following columns: id, starttime, endtime, ...
in python-application these entries can listed. you're supposed able enter search term , entries containing search term.
so instance if entries are
1, 05.04.2017 11:30:22, 05.04.2017 11:43:11 2, 06.04.2017 12:12:12, 06.04.2017 15:14:13
i can enter "05" , first entry, or "04" , both, or "11:4" , first one...
the thing other parts in application better not save formatted date in table seconds (14891410etcetc) returned time(). means searching, can't execute
select * table starttime 05
because looking 05 in seconds-value.
so: there way sneak function sqlite-command? works like
select * table time.strftime(starttime) 05
there date , time functions supported sqlite. see https://sqlite.org/lang_datefunc.html.
Comments
Post a Comment