1
我有一個像組串日曆類型
Customer_Todo_Master customerTodo=new Customer_Todo_Master();
customerTodo.setCALCDATE(String type);
這裏setCALCDATE
代碼是日曆類型。我如何設置一個字符串到這個setCALCDATE()
?使用SimpleDateFormat類
我有一個像組串日曆類型
Customer_Todo_Master customerTodo=new Customer_Todo_Master();
customerTodo.setCALCDATE(String type);
這裏setCALCDATE
代碼是日曆類型。我如何設置一個字符串到這個setCALCDATE()
?使用SimpleDateFormat類
:
String str="your string rep of cal";
Calendar cal = Calendar.getInstance();
cal.setTime(new SimpleDateFormat("your date format").parse(str));
customerTodo.setCALCDATE(cal);