I have a small problem. Can anyone please tell me how to append String value after SQLite function in Insert Statement. Code line is below :
myDataBase.execSQL("INSERT INTO network_data (DateTime, Signal, GPSLat, GPSLong, NetLat, NetLong) VALUES (datetime() /*Here I want to append value "GMT"*/, '" +Signal+ "', '" +GPSLat+ "', '" +GPSLong+ "', '" +NetLat+ "', '" +NetLong+ "');");
I want to append value "GMT" after 'datetime()' function.
I want Output like : "12:05:05 09:24:00 GMT"
This is a SQLite function in Android.
In Sqlite you can concat any string (text) with "||" this symbol.. In you case try this one..
("INSERT INTO network_data (DateTime, Signal, GPSLat, GPSLong, NetLat, NetLong) VALUES (datetime()||' GMT', '" +Signal+ "', '" +GPSLat+ "', '" +GPSLong+ "', '" +NetLat+ "', '" +NetLong+ "');");