Replace / with - while savinf file from todays date

Hi All,

I am saving my file by date but my date is comming in (dd/MM/yyyy) formate but excel file name doesnot support this "/"operator.
How my file name is comming:- Feed_09/01/2020.xlsx
How i want :- Feed_09012020.xlsx

@Gauri_Rawool

Try to replace the \
eg string path = Feed_09/01/2020.xlsx then replace the path variable by
path = Path.replace("/","")

Hi
Usually file path won’t take these two symbols along the path /, \

So to save them if the input is in strinput
stroutput = strinput.ToString.Replace(“/“,””)

To be even more better
stroutput = strinput.ToString.Replace(“/“,”_”)

So the output would be like
Feed_09_01_2020.xlsx
Which will be easy to identify the date and month

Cheers @Gauri_Rawool