问题
I just try to convert datetime to date, but without success. Help me to do it:
select date('startTime') from usertable ;
select datetime(substr(startTime, 7, 4 )) from usertable;
回答1:
Just try this.. it will convert datetime to date.
SELECT strftime('%d-%m-%Y', fieldname)
SELECT strftime('%d-%m-%Y', 'now') gives output 5-06-2015
来源:https://stackoverflow.com/questions/30661177/how-can-i-convert-datetime-to-date-format-in-sqlite-selected-vaues