Answers for "date time to string"

11

python datetime string

import datetime

today = datetime.datetime.now()
date_time = today.strftime("%m/%d/%Y, %H:%M:%S")
print("date and time:",date_time)
Posted by: Guest on May-21-2020
7

c# tostring mmm dd yyyy

DateTime.Today.ToString("MMM dd, yyyy");
Posted by: Guest on June-07-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
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
0

time to string

Dim strTime As String = "3:00 PM"

' Convert to datetime

Dim dtTime As DateTime = Convert.ToDateTime(strTime)
' Display in 24hr format

Response.Write(dtTime.ToString("HH:mm"))
Posted by: Guest on June-21-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language