1. Get dates from field of view object to variable
// Following is View Object object creation
JegPaBillRatesVOImpl vo=getJegPaBillRatesVO();
Date StartDate
= (Date)vo.getCurrentRow().getAttribute("EffectiveEndDate");
Date EndtDate =
(Date)vo.getCurrentRow().getAttribute("EffectiveEndDate");
System.out.println("StartDate= "+StartDate);
2. Write Following Code to compare dates
if(StartDate.dateValue().getTime() == EndtDate.dateValue().getTime())
{
System.out.println("Inside date validation and throw error
messages");
}
No comments:
Post a Comment