In the Service Portal, manually typed invalid dates can be saved incorrectly, such as '02-09-0017', when the variable is set to Mandatory

When using the Service Portal and interacting with service catalog Date variables, there is no check on the date format when the date field is set to Mandatory. When dates are manually typed using a two-digit format for the year (i.e. dd-MM-yy), the dates are saved in an incorrect format (i.e. 02-09-0017). The system is setting the date as dd-MM-yyyy, but the leading zeros come from the year value are being entered as 2-digits instead of four.

Steps to Reproduce

  1. Navigate to System Properties > System and confirm that the 'glide.sys.date_format' property is set to 'yyyy-MM-dd'.
  2. Edit the 'Create incident' Record Producer and add a Date variable 
  3. Navigate to Service Portal > Open the catalog item 'Create incident'
  4. Manually type the value of the Date field as '17-09-02' and click away from the date field:
    Note the message saying you used the wrong format - you aren't allowed to save the form, which is expected.
  5. Set the variable to Mandatory
  6. Open the Catalog Item again https://<instance-name>
  7. Manually type the value of the Date field as '17-09-02' and click away from the date field:
  8. Submit the form and look at the saved incident. 

 You do not see the bad-formatting message, and you are allowed to save the bad value, which saves as 0017-09-02. This is wrong.


This issue is under review. To receive notifications when more information is available, subscribe to this Known Error article by clicking the Subscribe button at the top right of the article. If you are able to upgrade, review the Fixed In field to determine whether any versions have a permanent fix.

Related Problem: PRB1300937

Seen In

London Patch 1 Hot Fix 2

Intended Fix Version


Safe Harbor Statement

This "Intended Fix Version" information is meant to outline ServiceNow's general product direction and should not be relied upon in making a purchasing decision. The information provided here is for information purposes only and may not be incorporated into any contract. It is not a commitment, promise, or legal obligation to deliver any material, code, or functionality. The development, release, and timing of any features or functionality described for our products remains at ServiceNow's sole discretion.

Associated Community Threads

There is no data to report.

Article Information

Last Updated:2018-12-26 12:22:13