Hi All

Need help om how to invistigate date most in future.

I have the following challange.
I receice multiple dates(as I expect) from a Oracle DB, I want to find the
date longes in the future from this values an set Login Expiration Time to
this date if it is longer in the future than the current date stored. How
can I do this

Below my Policy, that is not working when I try to evaluate dates

<?xml version="1.0" encoding="UTF-8"?><!DOCTYPE policy PUBLIC
"policy-builder-dtd" "C:Program
FilesNovellDesignereclipsepluginscom.novell.design er.idm.policybuilder_2.0.0.200706201206DTDdirxmlsc ript.dtd"><policy
xmlns:date="http://www.novell.com/nxsl/java/java.util.Date"
xmlns:format="http://www.novell.com/nxsl/java/java.text.SimpleDateFormat">
<rule>
<description>Calculate Login Expiration Time (Studerende)</description>
<comment xml:space="preserve">Udregner hvornår brugers Login Expiration
Time er</comment>
<conditions>
<and>
<if-class-name mode="nocase" op="equal">User</if-class-name>
<if-attr mode="nocase" name="VOS-User-Type"
op="equal">Student</if-attr>
</and>
</conditions>
<actions>
<do-set-local-variable name="CurrentLoginExpTime" scope="policy">
<arg-string>
<token-dest-attr class-name="User" name="Login Expiration Time"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="CalcLoginExpTime" scope="policy">
<arg-string>
<token-attr name="Login Expiration Time"/>
</arg-string>
</do-set-local-variable>
<do-set-local-variable name="NewLoginExpTime" scope="policy">
<arg-string>
<token-xpath expression="$CalcLoginExpTime+60*60*24*90"/>
</arg-string>
</do-set-local-variable>
</actions>
</rule>
<rule>
<description>Update Login Expiration date (Studerende)</description>
<comment xml:space="preserve">Opdater Login Expiration date for
studerende hvis den er længere ude i fremtiden end aktuel Login Expiration
date</comment>
<conditions>
<or>
<if-attr mode="nocase" name="VOS-User-Type"
op="equal">Student</if-attr>
</or>
<or>
<if-xpath op="true">$NewLoginExpTime>$CurrentLoginExpTime</if-xpath>
</or>
</conditions>
<actions>
<do-add-dest-attr-value class-name="User" name="Login Expiration Time">
<arg-value>
<token-xpath expression="$NewLoginExpTime"/>
</arg-value>
</do-add-dest-attr-value>
<do-trace-message level="3">
<arg-string>
<token-text xml:space="preserve">Login Expiration Time
forlænget</token-text>
</arg-string>
</do-trace-message>
</actions>
</rule>
</policy>