Answers for "datetime format python strftime"

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
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
10

strftime python

date_time = now.strftime("%m/%d/%Y, %H:%M:%S")
Posted by: Guest on January-22-2021
0

how to do date time formatting with strftime in python

from datetime import datetime
now = datetime.now()
print(now.strftime("%d %B %Y %A"))
Posted by: Guest on October-03-2021
10

strftime python

date_time = now.strftime("%m/%d/%Y, %H:%M:%S")
Posted by: Guest on January-22-2021
0

datetime.strftime() syntax

from datetime import datetime

date_string = "21 June, 2018"

print("date_string =", date_string)
print("type of date_string =", type(date_string))

date_object = datetime.strptime(date_string, "%d %B, %Y")

print("date_object =", date_object)
print("type of date_object =", type(date_object))
Posted by: Guest on July-19-2020
0

how to do date time formatting with strftime in python

from datetime import datetime
now = datetime.now()
print(now.strftime("%d %B %Y %A"))
Posted by: Guest on October-03-2021
0

datetime.strftime() syntax

from datetime import datetime

date_string = "21 June, 2018"

print("date_string =", date_string)
print("type of date_string =", type(date_string))

date_object = datetime.strptime(date_string, "%d %B, %Y")

print("date_object =", date_object)
print("type of date_object =", type(date_object))
Posted by: Guest on July-19-2020

Python Answers by Framework

Browse Popular Code Answers by Language