a ='2019-10-17' import datetime detester = '2019-10-17' date = datetime.datetime.now().strftime('%Y-%m-%d') print(date) s = '' ret_ss = s.split('--') print(ret_ss[0])