Code example for Timestamp

Methods: toString

0
		return mCur;
	} 
	 
	public long InsertPurchase(String name, double price){
		 
		Timestamp time = new Timestamp(System.currentTimeMillis());
		Log.i("Stamp", time.toString());
		ContentValues val  = new ContentValues();
		val.put(key_timestamp, time.toString());
		val.put(key_productid,name);
		val.put(key_p_price, price);
		return db.insert(purchases_table, null, val);
		 
	} 
	 
	public Cursor getAllPurchases(){
		 
		return db.query(purchases_table, new String[] {key_id, key_timestamp, key_productid, key_p_price }, null, null, null, null, null);
		 
	}