如何將特定的月數添加到存儲在數據庫中的日期。將個月添加到特定的java.sql.Date日期
private Date getStartDate(){
return new Date(Calendar.getInstance().getTimeInMillis());
}
private Date getEndDate(){
startDate = userSubscription.getSubscriptionStartDate();
Date endDate;
Calendar calendar = Calendar.getInstance();
//Now I am having trouble cause in add() method of calendar there is no long type parameter
return endDate;
}
你是什麼意思「無長型參數」? – 2014-09-26 12:58:57