But what about I want to use the specific date instead of the “status”?
For example the tile of the column is “8/1/2020” in stead of the “status”
And because I only want to read the value for current date, so I assign a variable currentdate=DateTime.now.ToString(“M/01/yyyy”)
But for the “If” activity, after I change the “status” to the variable_currentdate as below, then it never recognize(never return me the value),
It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.
First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.
You can check out some of our resources directly, see below:
Always search first. It is the best way to quickly find your answer. Check out the icon for that.
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.
Topic that contains most common solutions with example project files can be found here.
Read our official documentation where you can find a lot of information and instructions about each of our products:
Meet us and our users on our Community Slack and ask your question there.
Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.
Thank you for helping us build our UiPath Community!
Did you try formatting the current date to a particular format? Say, the date in your Excel file is 8/1/2020, you have to format the current date to suit that column name so, try this:
If col.ToString = DateTime.Now.ToString("MM/dd/yyyy"){
rowValue = row(col).ToString
}
The problem is in the “col.ToString” expression in the IF condition.
It will return a string formated according your default locale settings.
In my case it is “08/01/2020 00:00:00” - which indeed doesn’t match your “currentdate” variable.
I would recommend to change “currentdate” assign like follows:
currentdate=DateTime.Today.ToString
It will give you format compatible with “col.ToStrimg”