Skip to Content

Archived discussions are read-only. Learn more about SAP Q&A

Problems related to using date

The following is a piece of code where I am getting an error. The words in bold are not getting recognised......that is date cannot be recognised. Do I need to use any package for it..kindly suggest

IWDMessageManager msgMan = wdControllerAPI.getComponent()

.getMessageManager();

//Get field value of attribute under investigation

Date usrDate =(Date) wdContext.nodePerson().currentPersonElement().getAttributeValue(field);

//Get field properties of attribute under investigation

IWDAttributeInfo personAttr = wdContext.nodePerson().getNodeInfo().getAttribute(field);

//Check if date is in past using helper method

if (DateCalculator.isInPast(usrDate)) {

//If yes: report error message

msgMan.reportContextAttributeMessage(

wdContext.nodePerson().currentPersonElement(),

personAttr,

IMessageSub_comp.DATA_IS_IN_PAST,

new Object[] { field, usrDate },

true);

}

Former Member
Former Member replied

Hi,

just right-click in the editor and select Source - Organize Imports. Now select the class java.sql.Date.

Regards,

Martin

0 View this answer in context
Not what you were looking for? View more on this topic or Ask a question