Join the #BuildWithBuildAgent Challenge! Get recognized, earn exclusive swag, and inspire the ServiceNow Community with what you can build using Build Agent.  Join the Challenge.

Day of week shown in Date Fields

andrewdunn
Giga Expert

Hi Team - I have been asked if there is a way to show the day of the week either in the date field or the hover over.

So at the moment in the date/time field in lists it shows "04-08-2017 08:56:45"

What my users are asking for is a way to see "Friday 04-08-2017 08:56:45" either in the list or as a hover over.

The reason for this is so that when performing investigations across tickets they do not need to always have a calendar open to know if the work was done during business hours, etc.

While it is a nice to have it is not urgent, just wondering if anyone else has an insight.

Cheers

Andrew

1 ACCEPTED SOLUTION
5 REPLIES 5

andrewdunn
Giga Expert

I raised a ticket to Hi and received the following which has worked for me.


Under System Properties >> System >> Date Format


  • Change to "E dd-MM-yyyy"


Then in System Definition >> Validation Scripts >> Date/Time


Modify the script (I recommend copying the current script into the Description Field)



function validate(value) {


        // empty fields are still valid dates


        if(!value) {


                return true;


}


return (getDateFromFormat (value , 'E dd-MM-yyyy HH:mm:ss') != 0) ;


}