In my table, I have a datetime field that stores dates in this format:
YYYY/mm/dd HH:MM:SS
Now I need to get through the request only time.
I tried this
SELECT time(start_date) FROM table LIMIT 100
but no luck, it gives me "no error", but no records are returned
Any idea?
EDIT
I solved it! The problem is that SQLite requires Times to be in a format in which, if hours, minutes and seconds are less than 10, they must be represented by zero.
For example:
H:M:S WRONG --> 12:1:30 RIGHT --> 12:01:30
Moreover, the correct format for dates is YYYY-mm-dd, not YYYY / mm / dd.
dp.carlo
source share