aspose file tools*
The moose likes Other Application Frameworks and the fly likes Help!SpringFramework-Date conversion Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Help!SpringFramework-Date conversion" Watch "Help!SpringFramework-Date conversion" New topic
Author

Help!SpringFramework-Date conversion

Jayabalambika Rengarajan
Greenhorn

Joined: Feb 05, 2006
Posts: 5
Hi

I am facing a problem in my application.

I am doing a validation in my VO class for Date field.The date field is defined as string in my VO class.I am getting a correct validation message.

But further down, when I come to update module.I have to convert my string to date.I am sending the entire VO as argument for update instead of individual fields

Could anyone help me how to convert String back to date , put in VO and then update the database.

Please it is really urgent

Regards
Jaya
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Jayabalambika,
Welcome to the ranch. Could you please read the Naming Policy and change your name accordingly ? You need both first name and last name. Thank you for your comprehension.

What are you using to update the database ? Is it Spring JDBC ? Please clarify this first.


[My Blog]
All roads lead to JavaRanch
Jayabalambika Rengarajan
Greenhorn

Joined: Feb 05, 2006
Posts: 5
Using Hibernate technology to update database.
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Hibernate ? Doh, sorry I'm not an Hibernate user. I'm using iBatis, and I make some TypeHandlerCallback classes to use custom types. I guess Hibernate has the same kind of stuff, but I can't tell you. Sorry.

(What about http://www.hibernate.org/118.html#A18 ? )
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help!SpringFramework-Date conversion
 
Similar Threads
to convert string to date
Error in action class
Converting Date to String in JSP
passing object from jsp to action
ognl.MethodFailedException “setCreatedDate” failed for object com.security.data.PasswordHistory@d5b5