android - SQLite selecting date, with different date-format -


i'm trying select items date, format yyyy-mm-dd hh:mm:ss. thought work (from other threads on stackoverflow), doesnt:

string selectquery = "select * " + table_log_workout + " strftime('%y-%m-%d', " + key_date_begin + ") = " + date; 
  • table_log_workout being table.
  • key_date_begin being yyyy-mm-dd hh:mm:ss-dates.
  • date being yyyy-mm-dd im trying find results with.

date string literal , needs put in single quotes. or better yet, use ? placeholder , bind arguments.

there's no syntax error since 2014-11-27 valid expression evaluates integer 1976.


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -