public static String getDateStrToFormat(String day, String inFormat, String outFormat) throws ParseException {
        SimpleDateFormat sdf = new SimpleDateFormat(inFormat);
        Date date = sdf.parse(day);
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(date);
        String dayBefore = new SimpleDateFormat(outFormat).format(calendar.getTime());
        return dayBefore;
    }
@param day
@param inFormat
@param outFormat
@return String
@throws ParseException
core/src/main/java/com/dtstack/flink/sql/util/DateUtil.java