Date date = (Date)oaapplicationmodule.findViewObject("AddNewAssignmentVO").first().getAttribute("StartDate"); Date edate = (Date)oaapplicationmodule.findViewObject("AddNewAssignmentVO").first().getAttribute("EndDate"); if (date != null && edate != null) { String Xs11 = oapagecontext.getOANLSServices().dateToString(date); String Xs12 = oapagecontext.getOANLSServices().dateToString(edate); }
In the same way we can convert String to Date
oapagecontext.getOANLSServices().stringToDate("xxxx");
excellent post
ReplyDeleteHi Anil,
DeleteIf I wish to perform the same date conversion in my AM code, how do I get a handle to the oapagecontext?
From my CO I am calling,
am.invokeMethod("MyMethodName",serializedparams);
However I am not able to serialize and send the pageContext param also. Any help is appreciate.