Answer to Question #287512 in Python for sunny

Question #287512

name of month


1
Expert's answer
2022-01-14T13:47:00-0500
# Python3 code to demonstrate working of
# Get Month Name from Month Number
# Using strftime() + %B
from datetime import datetime


# initializing date
test_date = datetime(2020, 4, 8)
			
# printing original date
print("The original date is : " + str(test_date))


# getting month name using %B
res = test_date.strftime("%B")


# printing result
print("Month Name from Date : " + str(res))

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be the first!

Leave a comment

LATEST TUTORIALS
New on Blog
APPROVED BY CLIENTS