[Java]/*** obtain the date of a specified number of days from a specific date * @ param date specifies the date * @ param days gap Number of days * @ param format date format * @ return */public static String getAddDaysDate (String format, string date, int days) {if (CommonString. getFormatPara (format ). equals ("") {format = "yyyy-MM-dd";} SimpleDateFormat sdf = new SimpleDateFormat (format. toString (); if (CommonString. getFormatPara (date ). equals ("") {date = sdf. format (CommonDate. getToday (format);} Calendar calendar = Calendar. getInstance (); try {calendar. setTime (sdf. parse (date);} catch (java. text. parseException e) {e. printStackTrace ();} calendar. add (calendar. DATE, days); return sdf. format (calendar. getTime ();} select convert (varchar, getdate (), 23) only captures the current system date. select convert (varchar, getdate (), 8) only captures the current system time.