I want to read yesterday data from my master file which is in .xaml format
I want to read the yesterday data from master file which is in .xaml format can anyone help me on it
Welcome to uipath community
Can you tell us what is the issue. I don’t understand your problem.
If it is an Excel file You can Use read range activity and read the data in the file
If you need Yesterday date try with this expression
Datetime.now.AddDays(-1).tostring("dd-MM-yyyy")
Regards
Gokul
Yeah i tried it but it’s not working I will explain you my senario
Id. Date email. Status
- 11/11. X@mail. Pending
- 02/12. X@mail pending
- 01/12. X@gmail pending
In this scenario i have to pick the 01/12 day i.e yesterday data and i ahave to use it in my process
And. I have to use the that column data
I assume that it is an excel file
If yes, try with the below expression in the if activity
DateTime.ParseExact("01/12","dd/MM",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy").equals(DateTime.Now.AddDays(-1).ToString("dd-MM-yyyy"))
Regards
Gokul
(post deleted by author)
Can I use the excel row header instead of “01/12”
Because I need to run the process daily like tommorow ineed to process today i need yesterday’s data so i need to give it dynamically
The above expression will check the yesterday date in the column.
DateTime.ParseExact(Currentrow("ColumnNameORIndex").Tostring.Trim,"dd/MM",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy").equals(DateTime.Now.AddDays(-1).ToString("dd-MM-yyyy"))
This expression will check every column in the excel file if the condition meet it will go to the Then part.
It will work as dynamically. have you tried with this expression?
Regards
Gokul
String not valid as a datetime error showing
Can you share the sample excel file
Hello @Tea_coffie_235
Welcome to Uipath community…!
Please share a sample Excel file and the required output to get a better understanding.
Thanks
I have attached a sample data please help on it
Hey iam new to forum it’s saying new users can’t upload file can you share you mail so that i can forward it to you
Inside the For each row in data table activity
Use Log message / Write Line activity
Pass the CurrentRow("ColumnName").Tostring
and share the format of the Date.
Check out the Image
Regards
Gokul
I have tried that only i am but it’s not working
Need the format of the Date. So that we can pass in the expression based on date format @Tea_coffie_235
You can put the excel file in Google sheet and share the link
Share the Date format of the excel file
Try with this expression
DateTime.ParseExact("2/12/2022","dd/MM/yyyy",System.Globalization.CultureInfo.InvariantCulture).ToString("dd-MM-yyyy").Equals(DateTime.Now.AddDays(-1).ToString("dd-MM-yyyy"))
Regards
Gokul