Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

add days to a date java

	public static String addDaysToDateString(Date date, int days){
		
		Calendar calendar = Calendar.getInstance();
		calendar.setTime(date); 
		calendar.add(Calendar.DATE, days);
		
		date = calendar.getTime();
		
		return DateUtil.fromDateToString(date);
	}
 
PREVIOUS NEXT
Tagged: #add #days #date #java
ADD COMMENT
Topic
Name
8+2 =