In IDM UserApp, I need to convert an attribute value saved in eDirectory as “milliseconds from 1970” to a readable date format.


Add the following code for reading the attribute into the form:

d=new Date();
d.setTime(IDVault.get(recipient,'user','endDate') *1000);

Note that the Attribute end date must be added to the Directory Abstraction Layer.

0 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 50 votes, average: 0.00 out of 5 (0 votes, average: 0.00 out of 5)
You need to be a registered member to rate this post.

Disclaimer: As with everything else at NetIQ Cool Solutions, this content is definitely not supported by NetIQ, so Customer Support will not be able to help you if it has any adverse effect on your environment.  It just worked for at least one person, and perhaps it will be useful for you too.  Be sure to test in a non-production environment.

Leave a Reply

Leave a Comment

  • lcw5525 says:

    d=new Date();
    d.setTime((IDVault.get(null, (field.getValues()).toString(), ‘user’, ‘DisabledDate’)) *1000);

    i used this code, it return some value like>> NaN NaN

    why izzit it like this? how can i convert it into a readable date format?

Jun 27, 2007
4:10 am
Active Directory Authentication Automation Cloud Computing Cloud Security Configuration Customizing Data Breach DirXML Drivers End User Management Identity Manager Importing-Exporting / ICE/ LDIF Intelligent Workload Management IT Security Knowledge Depot LDAP Monitoring Open Enterprise Server Passwords Reporting Secure Access Supported Troubleshooting Workflow