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

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.


That's interesting. I didn't realize that setting was there! At some point lost in the mists of time, our administrators made that field read-only for our users, probably because it got lumped in with biographical data that is synced from our directory. We'll get that adjusted so that users can change it. It doesn't fully meet the flexible input style I'm looking for. I'm not always consistent myself in the way I type dates, so I wouldn't expect my users to be purely consistent either.


Hi Chris, just to add some info to this discussion - When the business asked me regarding date formats in ServiceNow, I explained them about the existing functionality like you've described. But their requirement seems to be more specific, as in they need to be able to see the date format based on their location & not the system specific...can this be done mate ?


You probably have some standard when it comes to user locations. If you are using an Identity Management integration such as LDAP to populate your user table, you should be able to write a transform that looks at the location of the user record and set the date format accordingly.


mrswann
Kilo Guru

Agree this is a big issue and one of my biggest shocks when first using the platform.



dates is a big subject in software coding anyway



some positives



upgraded from Calgary to Fuji and a new client script came to ensure that start date precedes end date this also included a date format check against the selected format, I have ported this to a catalog client script and applied to record producers to prevent dates being accepted as valid and misinterpreted or set to 00:00:00