Answers for "Convert datetime object to a String of date only in Python"

0

Convert datetime object to a String of date only in Python

import datetime
t = datetime.datetime(2012, 2, 23, 0, 0)
t.strftime('%m/%d/%Y')
#Output
'02/23/2012'
Posted by: Guest on June-29-2021

Code answers related to "Convert datetime object to a String of date only in Python"

Browse Popular Code Answers by Language