oshan
(Oviya S)
March 2, 2020, 9:21am
1
Hi friends,
I have file name in Reframework config file as below,
Backup filename= C:\Users\XXX\XX\Documents\UiPath\test{0}.xlsx
i need to pass yyyyMMddhhmm to {0}.
how can pass this variable to {0} in the workflow.
for example copy file.
From file: C:\Users\XXX\XX\Documents\UiPath\result.xlsx
To file: C:\Users\XXX\XX\Documents\UiPath\test{0}.xlsx —> i will take this from config file, but pass YYYYMMddHHmm instead of {0}
@oshan I believe you can use String Replace function
2 Likes
SowmyaLeo
(Sowmya Sivakumar)
March 2, 2020, 9:26am
3
@oshan
Please try String.Format(The fileName, yyyyMMddhhmm value)
2 Likes
Srini84
(Srinivas)
March 2, 2020, 9:27am
4
@oshan
You can do using String.Format
Eg Syntax : String.Format(“{0} {1} {2} …”, “value1”,“value2”,“value3”)
Hope this works
Thanks
2 Likes
@oshan in UIpath studio ,
filename= C:\Users\XXX\XX\Documents\UiPath\test{0}.xlsx
Updated FileName= String.Format(filename,Datetime.Today.tostring(“yyyyMMddhhmm”)) or
Updated FileName= String.Format(filename,Datetime.Now.tostring(“yyyyMMddhhmm”))
2 Likes
oshan
(Oviya S)
March 2, 2020, 9:37am
6
shanmukh_pothamsetty:
String.Format(
thanks a lot guys. for the quick response. it worked
system
(system)
Closed
March 5, 2020, 9:37am
7
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.