search cancel

Configure Date fields to only accept and display a standard date format.

book

Article ID: 240202

calendar_today

Updated On:

Products

CA Identity Suite

Issue/Introduction

Is there functionality in the IDM platform to ensure that dates manually entered in Identity Manager date fields use a standard format?

Environment

Identity Manager 14.3, 14.4

Resolution

The Date Picker attribute style is the simplest method for you to achieve the goal of having a consistent format for all your dates.   Looking closely at the documentation around the Date Picker configuration you can control both how the value is stored, and how the value is displayed using the Date Display pattern, and the Date storage pattern options.  Open the Task up, on the Tabs tab click the pencil next to the 'tab' name, click the Browse button next to the screen name and then Edit the screen.   On that page you should see your various attributes and can switch the  attributes to date pickers. 
https://api-broadcom-ca.wolkenservicedesk.com/attachment/get_attachment_content?uniqueFileId=RX/cqvh4bxACk27es7CCJQ==


This should enable you to format the dates both for display and backend storage exactly as you require. 

Documentation on patterns can be found here:
https://techdocs.broadcom.com/us/en/symantec-security-software/identity-security/identity-manager/14-4/configuring/user-console-design/configuring-profile-tabs-and-screens/field-styles/date-picker-options.html



Please note, that the table with the various settings shown in the documentation are the ones that we do NOT support from the SimpleDateFormat standard.



The other option would be to write a validation script to control what is entered into the date field, which becomes challenging as for the month you would have to only allow values from 1-12, but for days if you set it to allow 1-31 you could end up with a 'February 31st' date so special coding would be required for the 5 months with less than 31 days.
 
If you choose to go down the validation script route you'll want to review the documentation on Validation Rules:
https://techdocs.broadcom.com/us/en/symantec-security-software/identity-security/identity-manager/14-3/programming/programming-guide-for-java/validation-rules-for-attributes.html
and the examples from the \CA\Identity Manager\IAM Suite\Identity Manager\tools\samples\validationscripts\ folder.


Additional Information

As mentioned in the documentation:
The Date Storage Pattern, Show Time Picker, and Time Picker Format fields appear only when the attribute that you selected does not have the Date, ISODate, or UnicenterDate value type in the directory configuration file (directory.xml).