NotesDateTime to Java Date for Comparison

Hello,

I am sorry to double post about this, but I badly need some guidance on this.

I am trying to do a date comparison in an XPage to return a specific style to a ViewPanel Column. I had posted and some guidance was kindly given, but I need to convert the NotesDateTime value to a Java Date to do the comparison.

Please dont laugh at the following code (I really have not a clue) :

var doc = varRowView.getDocument();

if( doc == null ){

return “”;

}else{

var d = doc.getItemValue(“BidDueDate”);

var t = @Today();

if (d.toJavaDate().getDate() > t.toJavaDate().getDate()){

return “Overdue”;

}else{

return “”;

}

}

Not sure if I am even close, but I would really appreciate anyones help on this.

Subject: Comparison example

I’ve posted a comparison example in your original thread:

http://www-10.lotus.com/ldd/nd85forum.nsf/7756aedc25e6d81285256324005ac76c/59db79dc802ca15c8525775300628a3f?OpenDocument

Subject: BRILLIANT

Thank you very much - that works a treat!

Really appreciate your advice, will take it on board.

Thanks again.