Julian Date and BSSV

Andrew2009

Well Known Member
My date data dictionary is of type Julian. After I get it back in my BSSV as a java.util.Date object, do I need to convert it to Gregorian Date and if so, how?

Thanks

I'm using E900 and JDeveloper 11g.
 
Hi,
as previus answered to your question on oracle forum....

Published VO use java type, Internal VO use JDE Type.

To achive the conversion from the java date use getTime() as below:
InternalVO.setOrderDate_DRQJ(this.getOrderDate().getTime());


Best Regards.

Bruno Condemi
 
Bruno's answer is correct, but it's always better to check for null value before trying to convert in order to avoid an exception.

==
if(this.getOrderDate()!=null)
InternalVO.setOrderDate_DRQJ(this.getOrderDate().getTime());
==

I usually create a second accessor with Calendar type:

==
public void setOrderDate_DRQJ(Calendar dateCalendar)
{
if(dateCalendar ==null)
this.orderDate_DRQJ = null;
else
this.orderDate_DRQJ = dateCalendar.getTime();
}
==

Having created this second accessor for InternalVO data type, you assign JDE date with Java date simply as:

InternalVO.setOrderDate_DRQJ(this.getOrderDate());
 
Back
Top Bottom