Sqliteデータベースに日付を挿入したいのですが、この時点で固まっています。私は自分のpojoクラスでDateデータ型を取りました。今私はcontentvalueを使用して私のSqlite Databseにそのものを挿入したいので、どうすればよいですか?それはこのようなものです。SqLiteデータベースに日付を挿入する方法android
SQLiteDatabase db = getWritableDatabase();
ContentValues cv = new ContentValues();
String a = String.valueOf(dp.getDob());
cv.put(DOB, a);
POJOクラスで
Date dob;
public DoctorPojo(String name,Date dob,String gender, String adder,String city,
String cas,String mobile, Date date,String disease)
{
this.name = name;
this.dob = dob;
this.gender = gender;
this.adder = adder;
this.city = city;
this.cas = cas;
this.mobile = mobile;
this.date = date;
this.disease = disease;
}
http://tips.androidhive.info/2013/10/android-insert-datetime-value-in-sqlite-database/ –
の可能性のある重複したが、今私は私の作成文の中で取るために何が必要です日付? –