Re: struts-hibernate-mysql date problem

2008-08-24 Thread Dustin Pearce
The best way to handle dates globally in your application is to use a TypeConverter by extending ognl.DefaultTypeConverter; and overriding public Object convertValue(Map map, Object object, Class aClass). You register your type converter in xwork-conversion.properties ja

RE: struts-hibernate-mysql date problem

2008-08-22 Thread Nataraj Somaraju
Hi friend Hope this helps you. String yourDate="date in mm/dd/ format" (example: 08/22/2008) DateFormat df = DateFormat.getDateInstance(DateFormat.SHORT); ParsePosition pos = new ParsePosition (0); java.sql.Date wantedDate = new java.sql.Date(df.parse(yourDate,pos).getTim

Re: struts-hibernate-mysql date problem

2008-08-22 Thread Stephan Schröder
quick and dirty solution: i know that this works if you use hibernate with annotations so i'm certain that there is a possibility to do it with xml. With annotations you can declare whether the data is extracted directly from the property or indirectly over the getter-method of the property. Make