How to get the current date to show up on the service portal widget, Business Services Status?

mitchmo
Kilo Contributor

111.PNG

Today is the 25, but it only shows for July 24 and lower

2 REPLIES 2

Rama Chandra D
Kilo Guru

Hi Mitchell,



Check for these lines in server script.



  data.dates = [];


  for (var i = 5; i > 0; i--) {


  var d = new GlideDate();


  d.subtract(1000 * 3600 * 24 * (i - 1));


  data.dates.push(d.getDisplayValueInternal());


  }



i = 5 specifies the days in past for which the status needs to be fetched. I have checked my System Status page and it shows me today as well.



Darshak


lSurya 24
Giga Guru

Hello Mitchell,



Can you share the screenshots of widget code where it is fetching the dates. So it helps us debug better.