Format Time with Client Script

Lisa Goldman
Kilo Sage

Hello,

We currently have a Start Date / Time variable that looks like this:

LisaGoldman_0-1699911341624.png

Is it possible to remove the "second" digitals from the time?

 

Than you

1 REPLY 1

AshishKM
Kilo Patron
Kilo Patron

Hi @Lisa Goldman 

The variable is Date/Time based then there is no direct option for changing the format ( HH:mm:ss) and not recommended to change it.

 

There is a system property ( glide.sys.time_format  ) for time format , any change will impact globally.

 

Refer below thread for similar requirement

https://www.servicenow.com/community/developer-forum/is-it-possible-to-remove-seconds-from-the-date-...

 

https://www.servicenow.com/community/itsm-forum/i-need-to-remove-the-seconds-for-date-and-time-field...

 

Refer below for some custom approach to make second field as 00.

https://www.servicenow.com/community/developer-forum/how-to-set-seconds-in-datetime-at-00-value-in-b...

 

 

-Thanks,

AshishKMishra

Please accept solution and mark helpful if it helps you

 

 

 

 

 

 


Please mark this response as correct and helpful if it helps you can mark more that one reply as accepted solution