/ Published in: Java
Use UnboundID LDAP SDK entry.getAttributeValueAsDate()
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
/** * If the entry has the attribute {@code attributeType}, * converts the attribute value specified by {@code attributeType} * to a {@code Date} and returns the date; otherwise returns {@code null}. * * @param attributeType * The attribute type whose value will be converted * to a {@code Date}; must not be {@code null}. * * @return attributeType's value as a {@code Date}. */ return entry.hasAttribute(attributeType) ? entry.getAttributeValueAsDate(attributeType) : null; }