Skip to Content
avatar image
Former Member

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

}

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    avatar image
    Former Member
    Sep 11, 2008 at 09:30 AM

    Hi,

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

    Regards,

    Martin

    Add comment
    10|10000 characters needed characters exceeded