Forum Discussion
owlet0214
6 years agoHelper I
When the file name changes depending on the date
Hello, from Japan If the file name changes depending on the date, can I fix it by modifying the code? For example, in the case of today, an expression describing yesterday's date is placed. G...
- Anonymous6 years ago
let
partDate=DateTime.ToText(Date.AddDays( DateTime.LocalNow(),-1), "yyyy-MM-dd"),
Origine = Excel.Workbook(Web.Contents("https://www.aaa.com/files/documents/worldwide-"& partDate & ".xlsx"), null, true)
in Origine
owlet0214
6 years agoHelper I
Thanks!
But I get "worldwide-2020-06-29.xlsx ".
I want date of yesterday "worldwide-2020-06-28.xlsx"
Is it possible to get the date of the previous day?
Anonymous
6 years agoNot applicable
let
partDate=DateTime.ToText(Date.AddDays( DateTime.LocalNow(),-1), "yyyy-MM-dd"),
Origine = Excel.Workbook(Web.Contents("https://www.aaa.com/files/documents/worldwide-"& partDate & ".xlsx"), null, true)
in Origine
- owlet02146 years agoHelper I
Thnks so much!
Success!