Community FAQ
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
gw2dave
Engaged Sweeper
Is it possible to create a report that shows all the helpdesk tickets opened between 4:30pm -6:30pm Monday – Friday? There is a HD report that shows all tickets opened in a month and I'm just wondering if I can get more specific in terms of time and day.
3 REPLIES 3
brandon_jones
Champion Sweeper III
gw2dave wrote:
Is it possible to create a report that shows all the helpdesk tickets opened between 4:30pm -6:30pm Monday – Friday? There is a HD report that shows all tickets opened in a month and I'm just wondering if I can get more specific in terms of time and day.


I was able to narrow it down between Monday and Friday, but not the times. Here is the code. I used the Tickets created in the last 7 days canned report and edited it:

Select Top 1000000 htblticket.ticketid,
'#' + Cast(htblticket.ticketid As nvarchar) As Ticket,
htblticket.date As CreationDate,
htblticket.updated As LastUpdated,
htbltickettypes.typename As Type,
htblticketstates.statename As State,
htblpriorities.name As Priority,
htblsource.name As Source,
htblusers.name As [User],
htblusers1.name As AssignedAgent,
htblusers2.name As UserLastNote,
'../helpdesk/icons/' + htbltickettypes.icon As icon,
htblticket.subject As Subject
From htblticket
Inner Join htblpriorities On htblpriorities.priority = htblticket.priority
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Left Join htblagents On htblagents.agentid = htblticket.agentid
Left Join htblusers htblusers1 On htblusers1.userid = htblagents.userid
Inner Join htbltickettypes On htblticket.tickettypeid =
htbltickettypes.tickettypeid
Inner Join htblsource On htblticket.sourceid = htblsource.sourceid
Inner Join htblusers htblusers2 On htblticket.userid_lastnote =
htblusers2.userid
Where DatePart(WEEKDAY, htblticket.date) In (2, 3, 4, 5, 6) And
htblticket.spam <> 'True'
Order By htblticket.ticketid
I can get you the hour side of it:

Where DatePart(WEEKDAY, htblticket.date) In (2, 3, 4, 5, 6) And
DatePart(HOUR, htblticket.date) Between 16 And 19 AND
htblticket.spam <> 'True'


The minute side still gives me issues.


Brandon wrote:
gw2dave wrote:
Is it possible to create a report that shows all the helpdesk tickets opened between 4:30pm -6:30pm Monday – Friday? There is a HD report that shows all tickets opened in a month and I'm just wondering if I can get more specific in terms of time and day.


I was able to narrow it down between Monday and Friday, but not the times. Here is the code. I used the Tickets created in the last 7 days canned report and edited it:

Select Top 1000000 htblticket.ticketid,
'#' + Cast(htblticket.ticketid As nvarchar) As Ticket,
htblticket.date As CreationDate,
htblticket.updated As LastUpdated,
htbltickettypes.typename As Type,
htblticketstates.statename As State,
htblpriorities.name As Priority,
htblsource.name As Source,
htblusers.name As [User],
htblusers1.name As AssignedAgent,
htblusers2.name As UserLastNote,
'../helpdesk/icons/' + htbltickettypes.icon As icon,
htblticket.subject As Subject
From htblticket
Inner Join htblpriorities On htblpriorities.priority = htblticket.priority
Inner Join htblticketstates On htblticketstates.ticketstateid =
htblticket.ticketstateid
Inner Join htblusers On htblusers.userid = htblticket.fromuserid
Left Join htblagents On htblagents.agentid = htblticket.agentid
Left Join htblusers htblusers1 On htblusers1.userid = htblagents.userid
Inner Join htbltickettypes On htblticket.tickettypeid =
htbltickettypes.tickettypeid
Inner Join htblsource On htblticket.sourceid = htblsource.sourceid
Inner Join htblusers htblusers2 On htblticket.userid_lastnote =
htblusers2.userid
Where DatePart(WEEKDAY, htblticket.date) In (2, 3, 4, 5, 6) And
htblticket.spam <> 'True'
Order By htblticket.ticketid


aparis99
Engaged Sweeper II
gw2dave wrote:
Is it possible to create a report that shows all the helpdesk tickets opened between 4:30pm -6:30pm Monday – Friday? There is a HD report that shows all tickets opened in a month and I'm just wondering if I can get more specific in terms of time and day.


Did you ever figure this out? I'm looking to do the same thing.

Reports & Analytics

Ask about reports you're interested in and share reports you've created. Subscribe to receive daily updates of reports shared in the Community.

New to Lansweeper?

Try Lansweeper For Free

Experience Lansweeper with your own data.
Sign up now for a 14-day free trial.

Try Now