Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

reformatting dates using hibernate

Posted on 2005-03-29
5
Medium Priority
?
179 Views
Last Modified: 2013-11-24
I have a following mapping in hibernate:
<property name="poDate" column="PO_DATE" type="date"  not-null="true" />

Currently if I do this: <c:out value="${po_record.poDate}"/> , the page renders this:  2006-01-31
I'd like it to display this, instead: 01/31/2006

What's the best way to do that?
0
Comment
Question by:aturetsky
  • 3
  • 2
5 Comments
 
LVL 86

Accepted Solution

by:
CEHJ earned 500 total points
ID: 13654440
0
 
LVL 1

Author Comment

by:aturetsky
ID: 13654565
Thanks, CEHJ, that link was very useful.  I would prefer to do it in hibernate, though, since that field would always need to render that way throughout the app.
0
 
LVL 1

Author Comment

by:aturetsky
ID: 13654593
just saw your answer to my other question - so you think this one should be handled in jsp as well, even though it will always display the same?
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13654699
Definitely. The format is a view issue, not a model one. Dates are stored as numbers in the model
0
 
LVL 86

Expert Comment

by:CEHJ
ID: 13684302
:-)
0

Featured Post

[Webinar On Demand] Database Backup and Recovery

Does your company store data on premises, off site, in the cloud, or a combination of these? If you answered “yes”, you need a data backup recovery plan that fits each and every platform. Watch now as as Percona teaches us how to build agile data backup recovery plan.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month15 days, 7 hours left to enroll

577 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question