Resolve Time in days and hours format for report

sach1
Tera Guru

Hi All,

 

As suggested in WIKI i have added the attribute format=glide_duration to the 'calendar_stc' i,e resolved time field.

 

It shows the time in proper format, but when i create a report on it the time is shown in seconds.

 

Can someone please help me with this ?

 

var resolved = new SummaryTableWriter("incident", "");

resolved.setTitle("Average Resolution Time of Incidents per week");

resolved.setQuery("resolved_atONLast month@javascript:gs.beginningOfLastMonth()@javascript:gs.endOfLastMonth()"); //Get Incidents for Last Month

resolved.setTrend('resolved_at', 'week');

resolved.setAggregate('AVG'); // Set Average for Resolve Time field

resolved.setColumn('calendar_stc');

 

 

current.summary = resolved.generate();// Generate data for Summary table

current.setWorkflow(false);

current.update();

 

Regards,

Sachin

1 ACCEPTED SOLUTION

Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Sach,


Note: Adding attribute affects only the display on forms and lists. It does not change the display for reports. Consider reporting duration rather than resolve time to see hours and minutes in a report.



Thanks and Regards


Pradeep Kumar Sharma.


View solution in original post

7 REPLIES 7

deneech
Giga Expert


Hello



I was wondering if you was able to get the report to calculate in days, hours, minutes, and seconds?


Pradeep Sharma
ServiceNow Employee
ServiceNow Employee

Hi Sach,


Note: Adding attribute affects only the display on forms and lists. It does not change the display for reports. Consider reporting duration rather than resolve time to see hours and minutes in a report.



Thanks and Regards


Pradeep Kumar Sharma.


yes Pradeep, I ended up using duration for reporting.


Hello Pradeep,



I have two fields A and B having duration as a type. After adding these two fields I get a result which I have to store in another C field. I get the result after addition of these two fields. It's not storing a result into C field. I tried using format=glide_duration however, It's not storing any result. For this C field type was Integer. I want the result to be stored a in type of '3 days 9 hours 30 minutes'.