java - Sqlite group dates by day -


i'm trying retrieve list of different days table. stored in integer.

cal.gettime().gettime() 

returns number of milliseconds since january 1, 1970, 00:00:00 gmt represented date object.

what i've written

select strftime('%d-%m-%y'," + date_clmn + ") "                 + table_name +" group strftime('%d-%m-%y'," + date_clmn + ")" 

next, convert these values tostring. get:

24-11--471 

and after when try make query

strftime('%d-%m-%y',date_clmn)=24-11--471 

i nothing.

what's wrong?

will run in trouble timezone using way?

if there other ways make it, i'll glad hear you.

thanks in advance.

update

tried "date(" + date_clmn+ ",'unixepoch')" retrieved value "1970-01-01" 

since not storing date in table, need change field. try code:

"select strftime('%d-%m-%y'," + date_clmn + "/1000,'unixepoch') " + table_name +" group strftime('%d-%m-%y'," + date_clmn + "/1000,'unixepoch')" 

Comments

Popular posts from this blog

wordpress - (T_ENDFOREACH) php error -

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

Using django-mptt to get only the categories that have items -