-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