wood burning stoves 2.0*
The moose likes Struts and the fly likes How to set TimeStamp in DynaAction Form in Struts Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "How to set TimeStamp in DynaAction Form in Struts" Watch "How to set TimeStamp in DynaAction Form in Struts" New topic
Author

How to set TimeStamp in DynaAction Form in Struts

Sivabalakannan Nandagopal
Greenhorn

Joined: May 06, 2007
Posts: 16
Hi,

We are using Web Based Application uisng Struts 1.1 with Dyna Action Forms. In this, one of our requirement is to get one date from table, set it in DynaAction Form and display in front end.Here, the Date format in the database table is in the format yyyy-MM-dd HH:mm:ss.SSS. (back end we use is SQLSERVER 2005)

But whereas the date format which Dynaction form stores is YYYY-MM-DD so the time portion is cut out.

Struts-config we declared Date as follows.

<form-property name="dateInserted" type="java.lang.String" />
How Can I set the entire yyyy-MM-dd HH:mm:ss.SSS value from the database into my DynaActionform property?

Immediate help in this regard is appreciated.

Thanks

Rgds
Siva
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to set TimeStamp in DynaAction Form in Struts