→ 🚀What's New? Explore Lansweeper's Fall 2024 Updates! Fall Launch Blog !
‎09-28-2021 06:59 PM
Solved! Go to Solution.
‎09-29-2021 04:37 PM
Avg(Cast( DateDiff_big(ss, htblticket.date, htblticket.ticketid) As decimal ))
DateDiff(ss, htblticket.date, ClosedDate.CloseDate)
Select Top 1000000or something close to that.
DatePart(yyyy, htblticket.date) As Year,
DatePart(mm, htblticket.date) As Month,
Convert(nvarchar(10),Ceiling(Floor(Convert(integer, DateDiff(ss, htblticket.date, ClosedDate.CloseDate)) / 3600 / 24))) + ' days, ' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer, DateDiff(ss, htblticket.date, ClosedDate.CloseDate)) / 3600 % 24))) + ' hours, ' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer, DateDiff(ss, htblticket.date, ClosedDate.CloseDate)) % 3600 / 60))) + ' minutes' As [Elapsed Time]
‎09-29-2021 04:45 PM
DateDiff(ss, htblticket.date, ClosedDate.CloseDate)rather than
DateDiff_big(ss, htblticket.date, htblticket.ticketid)
‎09-29-2021 04:55 PM
RC62N wrote:
It's first thing in the morning and I haven't consumed enough caffeine. It looks like the report you're trying to modify is using the averages, so what I offered up won't be exactly what you're after. The key element applies, however: you want to calculate the difference between the start and close times, not the start time and the ticket ID.DateDiff(ss, htblticket.date, ClosedDate.CloseDate)rather thanDateDiff_big(ss, htblticket.date, htblticket.ticketid)
‎09-29-2021 04:37 PM
Avg(Cast( DateDiff_big(ss, htblticket.date, htblticket.ticketid) As decimal ))
DateDiff(ss, htblticket.date, ClosedDate.CloseDate)
Select Top 1000000or something close to that.
DatePart(yyyy, htblticket.date) As Year,
DatePart(mm, htblticket.date) As Month,
Convert(nvarchar(10),Ceiling(Floor(Convert(integer, DateDiff(ss, htblticket.date, ClosedDate.CloseDate)) / 3600 / 24))) + ' days, ' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer, DateDiff(ss, htblticket.date, ClosedDate.CloseDate)) / 3600 % 24))) + ' hours, ' +
Convert(nvarchar(10),Ceiling(Floor(Convert(integer, DateDiff(ss, htblticket.date, ClosedDate.CloseDate)) % 3600 / 60))) + ' minutes' As [Elapsed Time]
Experience Lansweeper with your own data. Sign up now for a 14-day free trial.
Try Now