How to: Search for Dates in Work Items
Many dates are added to work item forms automatically. You can find work items that were changed on a given day or during a specific time period. Limiting the scope of a query also helps with performance by only returning those results that fit the date range that you want to include.
Required Permissions
To perform these procedures, you must be a member of the Readers group or have the View work items in this node permission set to Allow. For more information, see Team Foundation Server Permissions.
To search for work items modified today
Insert a new row into a query.
Complete the Field column by selecting a field that is a date field type.
Note
Most date fields contain the word "date" in the field name.
In the Operator column, select = (Equal).
In the Value column, add the date in one of the following ways:
Type the date The date that you type must follow the format accepted by your computer's operating system.
Add Today's date Select @Today from the drop-down list to pick today's date for the field.
Note
You can also modify this variable to search for the current date minus a number of days. For example, to find all items activated in the last week, you would set the Field column to Activated Date, the Operator column to >=, and the Value column to @Today - 7.
Run the query.
To search for work items modified on a specific date
Insert a new row into a query.
Complete the Field column by selecting a field that contains a date.
Note
Most date fields contain the word "date" in the field name.
In the Operator column, select = (Equal).
In the Value column, type the date following the format accepted by your computer's operating system.
Run the query.
To search for work items modified over a range of dates
Insert a new row into a query.
Complete the Field name column by selecting a field that contains a date.
Note
Most date fields contain the word "date" in the field name.
For Operator, choose either > (Greater Than) if you only want items after the date, or >= (Greater Than or Equal To) if you want items that include the date that you select.
In the Value column, enter the first date in the range of dates following the date format accepted by your computer's operating system.
Insert another new row into the query.
For And/Or, select And.
For Operator, choose either < (Less Than) if you only want items before the date, or <= (Less Than or Equal To) if you want items that include the date that you select.
In the Value column, enter the last date in the range of dates following the date format accepted by your computer's operating system.
Run the query.
Note
You may need to group the two date rows for best results. For more information, see How to: Group or Ungroup Work Item Query Clauses.