Answers for "convert date to string in a format"

7

date to string java

Date date = Calendar.getInstance().getTime();  
    DateFormat dateFormat = new SimpleDateFormat("yyyy-mm-dd hh:mm:ss");  
    String strDate = dateFormat.format(date);
Posted by: Guest on April-24-2020
1

convert string date to datetime and format

var dateString = "2020-09-25T10:13:21.246321+01:00";
String formattedDateString = DateFormat('do LLLL yyyy').format(DateTime.parse(dateString)); 
// formattedDateString - OUTPUT: "25 September 2020"
Posted by: Guest on September-25-2020
-1

java date to string

Format formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String s = formatter.format(date);
Posted by: Guest on September-01-2020

Code answers related to "convert date to string in a format"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language