Welcome, Guest. Please Login
Tinderbox
  News:
IMPORTANT MESSAGE! This forum has now been replaced by a new forum at http://forum.eastgate.com and no further posting or member registration is allowed. The forum is still accessible via read-only access for reference purposes. If you wish to discuss content here, please use the new forum. N.B. - posting in the new forum requires a fresh registration in the new forum (sorry - member data can't be ported).
  HomeHelpSearchLogin  
 
Pages: 1
Send Topic Print
agent query for tasks in a certain week (Read 1593 times)
JRL
Full Member
*
Offline



Posts: 12

agent query for tasks in a certain week
Dec 29th, 2014, 8:40pm
 
Thanks for any help in advance.

I'm attempting to use an agent to seek all "done" tasks in a certain week. This can be bounded by days or set to a week of the year "week 42", doesn't matter to me.

Right now my agent can query a day:
AgentQuery=format(StartDate,m-d) == "12-28";

But I'm not sure how to set it up for a week. I didn't find any reference to a week number in formatting the date. If I could use the week number in formatting the date range, that would be simple.

Alternatively I could query a date range, again not obvious to me how I would format that in a query.

Thanks again.
Back to top
 
 

John L
OSX 10.10.1/ TB 6.1.1
  IP Logged
Mark Anderson
YaBB Administrator
*
Offline

User - not staff!

Posts: 5689
Southsea, UK
Re: agent query for tasks in a certain week
Reply #1 - Dec 30th, 2014, 4:09am
 
I don't believe there is an action code to get a numerical week of the year (or numerical day of the year). I guess at this point it's a feature request.

I suspect the query you cite may run a little faster as:

  $StartDate.month=="12" & $ StartDate.day=="28"

You might be able to use runCommand to check and then cache in an attribute the week number of items with $StartDates. But do not do that oparation within a query as it may slow TB down a lot.
Back to top
 
 

--
Mark Anderson
TB user and Wiki Gardener
aTbRef v6
(TB consulting - email me)
WWW shoantel   IP Logged
Pages: 1
Send Topic Print