How do I reference sqlite db column to use in update statement

Posted by user244190 on Stack Overflow See other posts from Stack Overflow or by user244190
Published on 2010-05-08T17:49:13Z Indexed on 2010/05/08 17:58 UTC
Read the original article Hit count: 227

Filed under:
|
|

I am trying to update a datetime column in an android sqlite db to use international date format (yyyy-mm-dd) instead of the current format (mm/dd/yyyy). I want to use the sqlite date() function to reformat the current value of the column. I thought it would be as simple as the following:

update tblename set thedate = date(thedate)

but the above does not work.

How would i write the sql statement to accomplish this?

thanks patrick

© Stack Overflow or respective owner

Related posts about sqlite

Related posts about android