For example, you could have a method in your business object such as:

*private *String getDateTime() {
        DateFormat dateFormat = *new *SimpleDateFormat("yyyy/MM/dd HH:mm:ss"
);
        Date date = *new *Date();
        *return *dateFormat.format(date);
}

above is good but i think you need something like that

*private *String getDateTime(datetime) {
        DateFormat dateFormat = *new *SimpleDateFormat("yyyy/MM/dd HH:mm:ss"
);
DateFormat dateFormat_next = *new *SimpleDateFormat("yyyy-MM-dd");
        Date date = *new *Date();
        *return *dateFormat.format(dateFormat_next.parse(datetime));

}

It will display date like 2010-01-15. You can change format according to
you.
-- 
You received this message because you are subscribed to the Google
Groups "Java EE (J2EE) Programming with Passion!" group.
To post to this group, send email to
java-ee-j2ee-programming-with-passion@googlegroups.com
To unsubscribe from this group, send email to
java-ee-j2ee-programming-with-passion+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/java-ee-j2ee-programming-with-passion?hl=en?hl=en

Reply via email to