time format

brendanwilson84
Kilo Guru

Hi Guys

I have a time field that is defaulted to current time and works as expected. However, I have got a request of "Can this be in 12 hour am/pm format instead of 24 hour"

Any way I can achieve this?

find_real_file.png

6 REPLIES 6

Aakash Shah4
Tera Guru

Hi,



Check this link might help


Add AM/PM attribute to time field


gauravchoudhury
Tera Guru

Hi Brendan,



Go to System Properties => Basic Configuration, select "hh:mm:ss (12 hour AM/PM)" for the "Time Format" setting.


dravvyramlochun
ServiceNow Employee
ServiceNow Employee

Hello



You can change the time format from Basic configuration -> Time format



The time format is defined by the property glide.sys.time_format. An administrator can modify the property by navigating to System Properties > System. Use the same 'format' strings as the java.text.SimpleDateFormat class, with minor exceptions. The format string consists of the following abbreviations.


FieldFull FormShort Form
Hour (1-12)hh (2 digits)h (1 or 2 digits)
Hour (0-23)HH (2 digits)H (1 or 2 digits)
Minutemm (2 digits)m (1 or 2 digits)
Secondss (2 digits)s (1 or 2 digits)

The default format is: HH:mm:ss.




Using Date and Time Fields - ServiceNow Wiki


is there anyway to have it only for my scoped app on that field. Not sure if i can change the global settings