cancel
Showing results for 
Search instead for 
Did you mean: 

Problems related to using date

Former Member
0 Kudos

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);

}

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Hi,

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

Regards,

Martin

Answers (0)