DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR PYTHON
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'
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#Convert
#datetime
#object
#String
#date
#Python
ADD COMMENT
Topic
COMMENT
Name
7+2 =
Submit