Change time "ago" on Service Portal

priisholm
Mega Expert

Hi guys! 🙂

In the ticket-widget'en on the Service Portal (Helsinki), ServiceNow will show date/times as "ago" (and it doesn't matter what the user-preferences are: calender, ago or both)

find_real_file.png

If you move the mouse over "6 min ago", ServiceNow will actually show the date+time:

find_real_file.png

In the ticket-conversions widget (HTML-part) it show the "sn-time-ago timestamp".

Of course I can clone the widget and change that part, but to what?

find_real_file.png

Thanks

Soren

21 REPLIES 21

anurag92
Kilo Sage

Try something like this:



<small class="text-muted">


                                      <span class="glyphicon glyphicon-time " />


                                      {{data.created_on}}


                                  </small>



find_real_file.png


<sn-time-ago> is a ServiceNow-Angular directive which is not available for the developers (I Guess).



Let me know if this helps.


SRJ
Tera Contributor

HI Anurag,



Its works fine in the Created date , but not in the first highlighted part, Could you please suggest what to change



find_real_file.png


Hi Jan,



Did you get a solution to this as we have the same requirement to show the full date time rather than time ago?



Thanks



Sam