I have string input = 31/12/2020
I want to write file in folder 2020 and write in file report 12.2020 as below.
Please guide me about it.
I have string input = 31/12/2020
I want to write file in folder 2020 and write in file report 12.2020 as below.
Please guide me about it.
Hi @fairymemay
input = “31/12/2020”
strYear = DateTime.ParseExact(strText,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“yyyy”)
strDate = DateTime.ParseExact(strText,“dd/MM/yyyy”,System.Globalization.CultureInfo.InvariantCulture).ToString(“MM.yyyy”)
You can use create folder activity to create the folder
pass this in the activity “Your Base file path” + strYear
and then use write range activity and “Your Base file path” + strYear + “/Report_” + strDate + “.xlsx”
Hi @fairymemay
For this scenario, do the below steps:
Attached screen shot for your reference.
In WriteRange activity, give path like this:
your2020FolderPath+"\"+splitingString(2)+"\Report "+splitingString(1)+"."+splitingString(2)+".xlsx"
Feel free to reach us at any time if you have doubts. Thanks.
Happy Automation
Please find the below image @fairymemay
yourString.Split("/"c)
Note: Variable type should be in arrayofString for this variable.
Thanks.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.