ACME-WorkItems - select date with condition . example date > January 2018

Hello All,
Some one could provide sample xaml or solution how can I convert Date column in work items date-table into string.
→ Select items with status open type WI4 and date >jan1st2018
I wrote ("Status=‘Open’ AND Type=‘WI2’ AND Date>???) … Can someone help me with how I can get the date >jan-01-2018

sample data:
WIID Description Type Status Date
900121 Verify Account Position WI1 Open 2018-08-19
620454 Generate Yearly Report for Vendor WI4 Completed 2018-06-19
160564 Generate Yearly Report for Vendor WI4 Open 2017-09-19


I think you caught the requirement little differently.
When you are appending you row to the output file you have to compare each row date value with the date.
In your condition you can use a date convert.
[CDate(item(5).ToString) > CDate('2018-01-01')

1 Like

Main.xaml (9.6 KB)
I have attached my xaml file here… when i use CData to filter it is throwing the below error… please let me know where Iam going wrong…

Message: The expression contains undefined function call CDate().

Exception Type: System.Data.EvaluateException

Hi @vekatesh_chowdary

Use the below condition

dt1.Select(“Status=‘Open’ AND Type=‘WI2’ AND Date > ‘2018-01-01’”).CopyToDataTable

Refer the below workflow

Main (24).xaml (11.3 KB)


@vekatesh_chowdary Try This :

DataTable.Select(“[Status]=‘Open’ and [Type]=‘WI2’ and [Date] > ‘2018-01-01’”).CopyToDataTable

You will get DataTable and then directly you can write that dataTable into excel.


Thank you …
Your statement is giving the expected result.
I have two questions here… Is the program automatically considering Date column as date datatype or is it considering only as string while compared?
Also while writing to excel dt is writing all the columns. I need only selected columns to write into excel. like only status Type and Date

Hi @vekatesh_chowdary

It considers it as generic value

For this use the below condition

Datatable.defaultview.totable(false,“Columnname1”,“Columnname2”,“Columnname3”) and store the output in datatable.

Thank you Anil…Its working…

Good to hear it worked for you :slight_smile: happy automation

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.