Reputation: 17527
In git I can use time modifiers to find all the commits made last week, for example:
git log --all --pretty='%C(auto)%h %cd %d' --date=short --since='last week' --until='this week'
When building a query in Azure DevOps I can set a number of days in the past, as in this example:
But 'last week' is not a set number of days ago. Today, Monday, last week might mean anything in the seven day period ending one day ago, while tomorrow, Tuesday, last week would mean anything in the seven day period ending two days ago, etc. Is there a way in Azure DevOps query builder to match the English usage of the phrase "last week" in the same way I can in git?
Upvotes: 1
Views: 4397
Reputation: 17527
Reading the documentation Query by date or current iteration I realise that I get exactly what I want by specifying
Created Date < @StartOfWeek
Created Date > @StartOfWeek('-1w')
or the simpler
Created Date < @StartOfWeek
Created Date > @StartOfWeek - 1
There are additional examples listed in the WIQL syntax documentation here
Upvotes: 3