I am trying to generate a filename in python on mac to record data everyday so that the filename has date in filename. Please refer the command below.
oi_filename= os.path.join("markets","storage","oi_data_records_{0}.json".format(datetime.now().strftime(%d%m%Y)))
where markets is in Desktop and storage is in markets folder.
Error
File "<ipython-input-20-e3a1aee3f506>", line 21
oi_filename= os.path.join("markets","storage","oi_data_records_{0}.json".format(datetime.now().strftime(%d%m%y)))
^
SyntaxError: invalid syntax
The basic idea is everyday a file to be created with full date in name so that the rest of program can park the data in the respective file.