Hi, how can I extract date from filepath “TestData\tuesday04/02/2025.xlsx”.
Expected output is 04/02/2025
@Nisha_K21
You can use regex to get date
System.Text.RegularExpressions.Regex.Match(“TestData\monday04/02/2025.xlsx”, “\d{2}/\d{2}/\d{4}”).Value
1 Like
Hi @Nisha_K21
str_Input = "TestData\tuesday04/02/2025.xlsx"
Output = System.Text.RegularExpressions.Regex.Match(str_Input,"\d+\/\d+\/\d+").Value
Hope it helps!!
Thanks both @Manisha_Ravindra @Parvathy
1 Like
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.