Java一行代碼

1.整數格式化成0X 的形式字符串sql

String hour=String.format("%02d", txtWaringTime.getCurrentHour());
String minute=String.format("%02d", txtWaringTime.getCurrentMinute());數據庫

2.導出sqlLite數據庫orm

DBHelper dbHelper = new DBHelper(getApplicationContext());
SQLiteDatabase db = dbHelper.getWritableDatabase();
String dbPathString=db.getPath();
FileUtil.copyfile(new File(db.getPath()), new File(
Environment.getExternalStorageDirectory()+ "/MNotify.db"), true);blog

相關文章
相關標籤/搜索