Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

convertDateTime: problems with year conversion

843842Aug 9 2005 — edited Aug 9 2005
In my application I want the user to enter a date into an input field following the pattern "d.MM.yyyy". Here's my code (where myDate is of type java.util.Date):
...
<h:inputText value="#{contentHandler.myDate}">
<f:convertDateTime type="date" pattern="d.MM.yyyy" />
</h:inputText>
...

Everything works fine until someone enters a date with a two-digit year, for example "12.08.05". This input is converted to "12.08.0005" but I'd rather have it converted to "12.08.2005". Any ideas or suggestions?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 6 2005
Added on Aug 9 2005
1 comment
47 views