from datetime import date
today = dt.datetime.today().date()
todays_file = 'C:\\Temp\\'+str(today.year)+str(today.month)+str(today.day)+str('.csv')
Running:
todays_file
gives:
'C:\\Temp\\2018124.csv'
BUT - I need this to be in the format yyyymmdd (not yyyymmd)
So expected output is:
'C:\\Temp\\20181204.csv'
Similarly, expected output on 3rd feb 2019 is:
'C:\\Temp\\20190203.csv'
Is there a smart way without using if len(today.day or today.month) = 1: etc