Skip to page contentSkip to chat
ServiceNow support
    • Community
      Ask questions, give advice, and connect with fellow ServiceNow professionals.
      Developer
      Build, test, and deploy applications
      Documentation
      Find detailed information about ServiceNow products, apps, features, and releases.
      Impact
      Accelerate ROI and amplify your expertise.
      Learning
      Build skills with instructor-led and online training.
      Partner
      Grow your business with promotions, news, and marketing tools
      ServiceNow
      Learn about ServiceNow products & solutions.
      Store
      Download certified apps and integrations that complement ServiceNow.
      Support
      Manage your instances, access self-help, and get technical support.
"Ask for Approval" Due Date Rules not working as expected in Orlando when system date format is dd-MM-yyyy - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • "Ask for Approval" Due Date Rules not working as expected in Orlando when system date format is dd-MM-yyyy
KB0829015

"Ask for Approval" Due Date Rules not working as expected in Orlando when system date format is dd-MM-yyyy


2498 Views Last updated : Apr 8, 2024 public Copy Permalink
KB Summary by Now Assist

Description

1. "Ask for Approval" Due Date Rules not working as expected in Orlando
2. When the "Ask for Approval" action Rules is configured for Due Date Reject if pending by Actual date <date> and the <date> is calculated via a script in a custom action, the approval record becomes No longer required.
3. This is only when the system date format is dd-MM-yyyy
4. It works fine when the date format is yyyy-MM-dd
5. It works fine in NY for any system date format

Steps to Reproduce

1. On any OOB Orlando instance, Go to System Properties > System change the Date format to dd-MM-yyyy > Save
2. Import the attached update set and commit it (even if it shows any error)
3. It contains cat item "SNC TEST ITEM 1" ; Flow "Approval Due Tests" and Action "Return Date and Time"
4. Open "SNC TEST ITEM 1" > Try it > Submit /com.glideapp.servicecatalog_cat_item_view.do?v=1&&sysparm_id=5bcdaeb1db019050016d853339961940
5. Open the RITM (make sure REQ is approved to trigger the flow)
6. After a few seconds, the approval generated for the RITM changes to No Longer Required
7. Go to System Properties > System change the Date format to yyyy-MM-dd > Save
8. Repeat steps 3-6
9. Open the RITM, its approval stays Requested

Workaround

Create a custom action which outputs a string rather than a Date or Date/Time.  Drag the output of the customer action to Due Date field.

In the custom action use the code on these lines:
////////////
(function execute(inputs, outputs) {
var currDate = new GlideDate();
currDate.setValue(inputs.date);
var addDays = parseInt(inputs.days);
currDate.addDaysLocalTime(addDays);
var dateStr = currDate.getByFormat("yyyy-MM-dd").toString();
gs.info(dateStr);
outputs.duedate = dateStr;
})(inputs, outputs);


Related Problem: PRB1410941

Potentially Seen In

There is no data to report.

Fixed In

Orlando Patch 9
Paris Patch 4
Quebec

The world works with ServiceNow.

Sign in for more! There's more content available only to authenticated users Sign in for more!
Did this KB article help you?
Did this KB article help you?

How would you rate your Now Support digital experience?

*

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

Very unsatisfied

Unsatisfied

Neutral

Satisfied

Very satisfied

What can we improve? Please select all that apply.

What are we doing well? Please select all that apply.

Tell us more

*

Do you expect a response from this feedback?

  • Terms and conditions
  • Privacy statement
  • GDPR
  • Cookie policy
  • © 2025 ServiceNow. All rights reserved.