Reputation: 1551
I have a small SQLite3 DB that has an integer field called "dt". It stores date and time.
I am having trouble extracting just the date from the field. However, doing a "select date(dt) from log2" returns nothing. I've tried strftime() as well, but no cigar.
Please help. This is driving me insane.
Thanks.
Upvotes: 0
Views: 46
Reputation: 11
if the Date in dt is wellformed then the result shoeld be the date from a datetime column
select date('2011-01-01 23:55:55');
should receive
2011-01-01
but select date('2011-01-01 23:55:5');
would receive nothing
so the dt coloum have to be wellformed
Upvotes: 1