Date sdate=null;
Calendar c = new GregorianCalendar();
c.setTime(tbScheduleDutyEntity.getStartDate());//設置參數時間
c.add(Calendar.MINUTE,-30);
sdate=c.getTime();
注:tbScheduleDutyEntity.getStartDate()為Date類型,如果字符串請先轉成Date類型。
Date sdate=null;
Calendar c = new GregorianCalendar();
c.setTime(tbScheduleDutyEntity.getStartDate());//設置參數時間
c.add(Calendar.MINUTE,-30);
sdate=c.getTime();
注:tbScheduleDutyEntity.getStartDate()為Date類型,如果字符串請先轉成Date類型。
本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。