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.
For date format dd-MM-yyyy the fields Date and Date/Time display incorrect values when a default value is specified - Known Error
  • >
  • Knowledge Base
  • >
  • Known Error (Knowledge Base)
  • >
  • For date format dd-MM-yyyy the fields Date and Date/Time display incorrect values when a default value is specified
KB0692765

For date format dd-MM-yyyy the fields Date and Date/Time display incorrect values when a default value is specified


7841 Views Last updated : Apr 7, 2024 public Copy Permalink
KB Summary by Now Assist

Description

Service Portal displays an incorrect value for the variable types Date and Date/Time when their default value is set to "gs.nowDateTime()" or any other specific date value in any other format (eg: 12/05/2017 or 12-05-2017 ) and the date format is set to "dd-MM-yyyy".

Note:
- this issue is only observable when the specified date format is set
- the issue is for default values and not gs.nowDateTime as it is still reproducible when passing a date value
- works as expected in the instance, the issue only on service portal.

Steps to Reproduce

1. Login to Istanbul
2. Impersonate user: System Administrator
3. Go to: Service Catalog > Maintain Items > Open any record
4. Under variables define two variables:
    - A date and a date/time variable
    - Give them the order value of 100 and 200 respectively
    - Provide a default value for both of them (gs.nowDateTime() or any specific date value)
5. Go to Profile from the instance header
6. Change Date format to "dd-MM-yyyy"
7. Open the item on the instance
8. Observe the value will be the current date if gs.nowDateTime() was used else it will have the date value provided
9. Open the same item on the Service Portal

Expected Beahviour
=================
Should be the current date if the gs.nowDateTime() was used or the specified date value in the default value field on the variable.

Observed Behaviour
==================
The value in the field is not correct.


Workaround

There is no workaround present for this issue and as per the comments from the developers the issue is no longer occurring in the London version of the platform.


Related Problem: PRB966509

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.