sql - Sqlite on Android: select time only from datetime -
i have date , time (saved plain text string) in sqlite in following format: yyyymmddhhmm (hours , minutes in end). can make select based on time - day between 18:00 , 20:00?
you can extract parts of datetime stamp substr() , use regular comparison operators <, > or between on it. example:
select * tablename substr(timestampcolumn, 9, 4) between '1800' , '2000';
Comments
Post a Comment