Allow more date input formats

Bradley Ross
Tera Guru

There are lots of acceptable ways to write a date (depending on your locale). What methods do you use to allow your users to enter a date in multiple formats in a field and have it get saved in a standard format? I love how I can type almost anything into Excel and have it get interpreted correctly as a date. That doesn't happen in ServiceNow. Am I missing something?

1 ACCEPTED SOLUTION

You do not want to spend time on a solution that already exists. I was able to change my date formatting in my profile to be MM-DD-YYYY, then type in a date into a date field (e.g.: 02-14-2016) and it shows up correctly when you select the picker. Try it yourself:



1. Go to your profile.


2. Select a date format that is different than what you have as your default date format.


3. Go to a form that has a date field.


4. Enter the date in the format you selected from step 2.


5. Tab away from the field.


6. Choose the date picker.



Since every user can be set to use a different format, you can probably work with your Identity Management or LDAP administrators to have the date format as part of the feed to ServiceNow. That way the user does not need to be responsible to change their settings themselves, and you can set the format based upon the preferred date format for the location the user is in.


View solution in original post

12 REPLIES 12

What is the name of the Client Script? Was it Out of Box, or was it something you created? Not to toot my own horn, but I have been working on a client callable script include that does date checking and filling. I struggled a lot with formatting until I found out that ServiceNow uses the SimpleDateFormat class. To see what formats are used, see the following page:


Class java.text.SimpleDateFormat


mrswann
Kilo Guru

I believe OOTB , was a nice surprise! I will confirm name but runs against change_request