Answers for "methods convert date to string date"

0

from date to string

SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");  
try {  
    Date date = new Date();  
    String dateTime = dateFormat.format(date);
    System.out.println("Current Date Time : " + dateTime); 
} catch (ParseException e) {
    e.printStackTrace();  
}
Posted by: Guest on April-27-2021

Code answers related to "methods convert date to string date"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language