-2
我想使用android studio將當前日期插入到mysql數據庫中。我正在使用排球庫插入。只需要提示,不詳細。誰能幫我? 在此先感謝!使用android studio將當前日期插入到mysql數據庫中?
我想使用android studio將當前日期插入到mysql數據庫中。我正在使用排球庫插入。只需要提示,不詳細。誰能幫我? 在此先感謝!使用android studio將當前日期插入到mysql數據庫中?
> You should try this one for getting current date:
DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd");
String todate= dateFormat.format(currentdate());
String finalto = todate.toString(); //here you get current date
private Date currentdate() {
final Calendar cal = Calendar.getInstance();
cal.add(Calendar.DATE, 0);
return cal.getTime();
}
感謝您的幫助Harshal Deshmukh。 – WakasAhmad
wc先生.......... –
你已經試過了什麼?你看過[圖書館培訓中心](https://developer.android.com/training/volley/index.html)嗎? – andreybleme
是的,我已經嘗試插入日期,但它不工作。你能幫我一點嗎? – WakasAhmad
我忍不住看到代碼被剪掉。把你的問題放在哪裏不行,所以我可以幫你。 – andreybleme