Formatting a date field in a Record Producer

ServiceNowSteve
Giga Guru

Good Afternoon,

I am having an issue where I have date fields on a record producer that users click on to populate with a calendar selector. Works great and displays the date on the portal in the MM-DD-YYYY format however once the item is submitted and turned into an incident the date shows in YYYY-MM-DD format.

How do I make the date on the incident use the same formatting as the portal (MM-DD-YYYY) format?

 

1 ACCEPTED SOLUTION

ServiceNowSteve
Giga Guru

I figured it out, I just needed to use .getDisplayValue() to reference it as is

 

Example: var orderDate = producer.order_date.getDisplayValue();

View solution in original post

3 REPLIES 3

Sumanth16
Kilo Patron

Hi ,

 

Update system property: 

glide.sys.date_format

Value: yyyy-MM-dd

If issue still exist please refer below articles:

 

https://community.servicenow.com/community?id=community_blog&sys_id=f5ac2625dbd0dbc01dcaf3231f961929

https://hi.service-now.com/kb_view.do?sysparm_article=KB0696705

 

Please mark it a shelpful (or) correct if it helps.

 

Thanks,
Sumanth

I appreciate the assistance however changing the system property didn't seem to make a difference for the record producer.

ServiceNowSteve
Giga Guru

I figured it out, I just needed to use .getDisplayValue() to reference it as is

 

Example: var orderDate = producer.order_date.getDisplayValue();