Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

convert str to datetime

import datetime

# str value "Apr 2, 2019" convert into any format. 
datetime.datetime.strptime('Apr 2, 2019', '%b %d, %Y').strftime('%a, %d %b %Y')
Source by www.golinuxcloud.com #
 
PREVIOUS NEXT
Tagged: #convert #str #datetime
ADD COMMENT
Topic
Name
5+5 =