<div dir="ltr"><div><div><div>Hi all,<br><br></div>This has been kicked around a few times over the years if google & the list archives are anything to go on, but I haven't actually seen a solution that meets what any of the requestors (and me) want.<br><br></div>Which is... to run a search using a date like:<br><br></div>
<p class="MsoNormal">Queue = 'myqueue' and ( ( Status = 'open' or Status
= 'new' ) OR ( Resolved > 'first dow after last month' ) )<span style="mso-ansi-language:EN-US;mso-fareast-language:EN-AU" lang="EN-US"></span></p><p class="MsoNormal"><br></p><p class="MsoNormal">or "last month + 1" or "first dom" or really anything that will programmatically always return the first day of this month. I have a shell script that does this by constructing a date in bash, and then passing the date to the query as a variable, but I can't do this within the "save search" function. <br></p><p class="MsoNormal"><br></p><p class="MsoNormal">The reason I'm after "save search" is that the HTML reports are easier for humans to read than the TSV extracts that the bash scripts generate.</p><p class="MsoNormal"><br></p><p class="MsoNormal">things like "last month" get close - but it simply works out "now - 30 days". And I can't see a way in Time::ParseDate to extract the month and year in the same way I would in bash using something like <span style="font-size:11pt;font-family:"Calibri",sans-serif">`date +%b`</span></p><p class="MsoNormal"><br><span style="font-size:11pt;font-family:"Calibri",sans-serif"></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif">MIT have a nice page that has better examples than the Time::Parse doco <a href="http://kb.mit.edu/confluence/pages/viewpage.action?pageId=4269222">http://kb.mit.edu/confluence/pages/viewpage.action?pageId=4269222</a> but I can't work out how to construct the thing I want using what's available.</span></p><p class="MsoNormal"><br><span style="font-size:11pt;font-family:"Calibri",sans-serif"></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif">Please tell me I'm wrong!</span></p><p class="MsoNormal"><br><span style="font-size:11pt;font-family:"Calibri",sans-serif"></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif">Regards,</span></p><p class="MsoNormal"><br><span style="font-size:11pt;font-family:"Calibri",sans-serif"></span></p><p class="MsoNormal"><span style="font-size:11pt;font-family:"Calibri",sans-serif">Chris<br></span></p>
</div>