Answers for "python date time format"

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
4

python format datetime

# 10 July 2021, 10:54:27AM
datetime.strftime("%-d %B %Y, %I:%M:%S%p")
Posted by: Guest on July-12-2021
4

python format datetime

# 10 July 2021, 10:54:27AM
datetime.strftime("%-d %B %Y, %I:%M:%S%p")
Posted by: Guest on July-12-2021

Python Answers by Framework

Browse Popular Code Answers by Language