Question about Excel date

Hi all,

I have a question regarding the Excel Application Scope, hope you guys can help me out.

I will export an Excel file everyday with its name ‘Daily_Run_date’ and I need the UiPath to read this file, but it couldn’t read the fixed date since the date changes everyday.

It seems like it works with the following format:
"D:\Daily Run\Daily_Run_date" + date + “.xlsx”

but it wouldn’t work, I think the problem is at ‘date’ there.

Do you guys have any solution on this? Thanks in advance.

Hi,

Can you share your expected output?

For example,if you need the below file path,

D:\Daily Run\Daily_Run_date20221018.xlsx

the following expression will work.

"D:\Daily Run\Daily_Run_date" + Now.ToString("yyyyMMdd") + ".xlsx"

Regards,

Hii,@BBCC_0000

If your ouput file name is like

D:\Daily Run\Daily_Run_date_18/10/2022.xlsx

Then you must try this

“D:\Daily Run\Daily_Run_date_” + Now.ToString(“dd/MM/yyyy”) + “.xlsx”


Regards,
Armila

Hi @BBCC_0000

Welcome to UiPath community

  1. Use Assign activity
TodaysDate = Datetime.now.Tostring("dd-MM-yyyy")

Try with this expression

"D:\Daily Run\Daily_Run_date_"+TodaysDate + ".xlsx"

Regards
Gokul

Thanks! It works well, hope you have a nice day! :smiley:

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.