Horje
Add Future Date in AndroidStudio Code Example
Add Future Date in AndroidStudio
String dt = "2012-01-04";  // Start date
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
try {
    c.setTime(sdf.parse(dt));
} catch (ParseException e) {
    e.printStackTrace();
}
c.add(Calendar.DATE, 40);  // number of days to add, can also use Calendar.DAY_OF_MONTH in place of Calendar.DATE
SimpleDateFormat sdf1 = new SimpleDateFormat("MM-dd-yyyy");
String output = sdf1.format(c.getTime());




Java

Related
RTC_WAKEUP Code Example RTC_WAKEUP Code Example
multiple recyclerview not scrolling bottom sheet Code Example multiple recyclerview not scrolling bottom sheet Code Example
franchiseRulesTemp Code Example franchiseRulesTemp Code Example
read properties file outside jar java Code Example read properties file outside jar java Code Example
download a website as string kotlin Code Example download a website as string kotlin Code Example

Type:
Code Example
Category:
Coding
Sub Category:
Code Example
Uploaded by:
Admin
Views:
7