Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to add minutes in date in java

// Adding 10 mins using Date constructor.
Calendar date = Calendar.getInstance();
System.out.println("Current Date and TIme : " + date.getTime());
long timeInSecs = date.getTimeInMillis();
Date afterAdding10Mins = new Date(timeInSecs + (10 * 60 * 1000));
System.out.println("After adding 10 mins : " + afterAdding10Mins);
Comment

PREVIOUS NEXT
Code Example
Java :: java how to make a gui 
Java :: how to print multiple lines in java 
Java :: how to read a string after an integer in java 
Java :: how to set title in center in toolbar in android 
Java :: add to array function java 
Java :: java print two dimensional array 
Java :: convert int array to Integer list java 
Java :: how to add music to java 
Java :: Unrecognized option: --version Error: Could not create the Java Virtual Machine. Error: A fatal exception has occurred. Program will exit. 
Java :: how to set list data to android spinner 
Java :: java transfer file over socket 
Java :: char array to string java 
Java :: int to enum java 
Java :: how to write a json file using java 
Java :: sort list of string lexicographically java 
Java :: how to initialise array in java without size 
Java :: turn java code to .exe 
Java :: spring boot procfile run profile 
Java :: hashmap foreach 
Java :: make frame visible java 
Java :: main methode java 
Java :: java argument main 
Java :: How to solve the N queens problem in Java? 
Java :: initialize hashset with values java 9 
Java :: android checkbox tint color 
Java :: java arithmetic operators 
Java :: how to print hello world java 
Java :: java random array 
Java :: prepared statement update 
Java :: java does file exist 
ADD CONTENT
Topic
Content
Source link
Name
6+3 =