一個月後的日期轉換

 Date dt= new Date();
                   Calendar cd = Calendar.getInstance();
                   cd.setTime(dt);
                   cd.add(Calendar.MONTH, 1);
                   java.text.SimpleDateFormat formatter_f = new java.text.SimpleDateFormat( "yyyy-MM-dd ");
                   String new_date_f = formatter_f.format(cd.getTime());
                   String date="'"+new_date_f+"'";
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章