Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

strptime

import datetime

date = '2021-01-01'
# For a datetime.datetime obj:
datetime.datetime.strptime(date, '%Y-%m-%d')
# For a datetime.date obj:
datetime.datetime.strptime(date, '%Y-%m-%d').date()
 
PREVIOUS NEXT
Tagged: #strptime
ADD COMMENT
Topic
Name
7+6 =