Hi! In my Web Application I retrieve data using Hibernate and display it in a RichFaces dataTable.
In my MySQL-table there is a field of type "date". When I print this field to the log in my Bean, it shows the correct date from database (e.g. 2010-04-21). But in the rich:dataTable it shows up like this:
4/20/10
So there is a discrepancy of 1 day!
I added the "f:convertDateTime" converter and set the "type" attribute to "both" in order to display time too. So now it shows:
4/20/10 10:00:00 PM
The Code for "f:convertDateTime" I've used:
<f:convertDateTime locale="locale.US" type="both" dateStyle="short"/>
So it seems like f:convertDateTime dreams up some time because there is no time information in the MySQL-table field!
What am I doing wrong? What do I need to do to display the correct date?
Thanks Tom