How i can get the Login expiration time and convert into DataTimePicker
format in the Form.

userApplication 4.0.1

My workflow

start
|
|

Create entity
|
|

finish


To update Login expiration time from Form to eDirectory i used below
code got from the forum and it works fine.


function setDateTime() {
/*
convert date from workflow to eDirectory format
date or datetime picker is used to pick the date
*/
var edirFormat = new java.text.SimpleDateFormat("yyyyMMddhhmmssZ");
var workflowFormat = new
java.text.SimpleDateFormat("yyyyMMddhhmmssSSSZ");
try {
var tempDate =
workflowFormat.parse(flowdata.get('Start/modify_user/AccountExpirationDate'));
} catch (err) {
return err
}
return edirFormat.format(tempDate);

};
setDateTime();



Now how to reverse it. i want to get from the eDirectoy and display in
the from in DateTimepicker format?


I fetch and update the form using the below code

function getDetail( dn, AccountExpirationDate, LoginExpirationTime)
{
dn=form.getValue("UserName");
if ( dn == "" ) return;
try
{
var av = IDVault.get( AccountExpirationDate, dn, "user",
LoginExpirationTime );
}
catch(e)
{
alert( AccountExpirationDate+": error getting "+LoginExpirationTime+"
for "+dn+": "+e );
}
}
getDetail( field.getValue(), 'AccountExpirationDate',
'LoginExpirationTime' );

But it display in eDirectory format, which i wanted to display in
Datepicker format.


--
lvaradha
------------------------------------------------------------------------
lvaradha's Profile: https://forums.netiq.com/member.php?userid=226
View this thread: https://forums.netiq.com/showthread.php?t=47401