Answers for "convert stringdate to time"

1

from string to date

String dtStart = "2010-10-15T09:27:37Z";  
SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss'Z'");  
try {  
    Date date = format.parse(dtStart);  
    System.out.println(date);  
} catch (ParseException e) {
    e.printStackTrace();  
}
Posted by: Guest on April-27-2021
0

convert string time to date time object

cr_date = '2013-10-31 18:23:29.000227'
cr_date = datetime.datetime.strptime(cr_date, '%Y-%m-%d %H:%M:%S.%f')
cr_date = cr_date.strftime("%m/%d/%Y")
Posted by: Guest on June-15-2021

Code answers related to "convert stringdate to time"

Python Answers by Framework

Browse Popular Code Answers by Language