Hi all,
I want to save an excel file with current date and time in a folder. How can I do it.

I know its very simple but please help me.
Thanks in advance

what is the format of date time you require?

just add now.tostring(“ddMMyyyy_hhmmss”) to your file path

format ddMMyyyy_hhmmss you can change on your requirement

so finally the path should something like this “initialpath”+now.tostring(“ddMMyyyy_hhmmss”)+“.xlsx”

or you can use this way as well,now.tostring("ddMMyyyy_hhmmss")+".xlsx")

Hope this helps


my path is "D:\ABD"+"Output"+"Data" inside this data folder i want to save the file with date and time
23-05-2023 13:08 i want in this format but I am getting error

your file path+“_”“.xlsx”

HI @honey.123.631

Yes You cant create a folder or file name with the colon on it

File or folder name should not contains these symbols

You can use it without colon “:”, try like this


Try like this


what is Output here?

is it any variable?


Output is a folder

try this


some of the special characters are not allowed to use in path


hi @honey.123.631

You should create a variable called as


Making sure that your path till Data and Output, or the folder structure is already present and accounted for.
Now you can use this SavedFilePath Variable in your code in the future.

Happy Automation!

Thank you all