What do you want to save?
Add Code snippet
New code examples
-
Python 2021-09-17 16:25:01
convert str to datetime
import datetime date_time_str = '2018-06-29 08:15:27.243860' date_time_obj = datetime.datetime.strptime(date_time_str, '%Y-%m-%d %H:%M:%S.%f') print('Date:', date_time_obj.date()) print('Time:', date_time_obj.time()) print('Date-time:', date_time_obj) Add solution -
Python 2021-09-16 06:25:02
python datetime from string
import datetime date_time_str = '2018-06-29 08:15:27.243860' date_time_obj = datetime.datetime.strptime(date_time_str, '%Y-%m-%d %H:%M:%S.%f') print('Date:', date_time_obj.date()) print('Time:', date_time_obj.time()) print('Date-time:', date_time_obj) Add solution -
Other 2021-09-10 22:34:02
get unadjusted stock data
from datetime import datetime import json from urllib.parse import urlencode from urllib.request import urlopen def gethistory(symbol, start=None, end=None): # Return 3 tuples (quotes, dividends and splits) with data from start # to end datetimes ... Add solution