Anil's Blog is Best Viewed on GOOGLE CHROME

Thursday, April 16, 2009

How to compare two dates

import oracle.jbo.domain.Date;

Date scoStartDate = null;
Date scoEndDate = null;
 
scoStartDate = (Date)rowi.getScoRoleStartDate();  // Capturing dates from RowImpl
scoEndDate = (Date)rowi.getScoRoleEndDate();  // Capturing dates from RowImpl
 
java.sql.Date javaSqlDate = scoStartDate.dateValue();

if (scoEndDate.dateValue().before(javaSqlDate))
{
           //throw Exception
}

No comments:

Post a Comment

Note: Only a member of this blog may post a comment.