| Author |
f:convertDateTIme problem
|
Dwijen Bhattacharjee
Greenhorn
Joined: Mar 31, 2008
Posts: 26
|
|
Hi, I want a output like Monday,May19 2008so i use the following code <h utputText value="#{testBean.date}" > <f:convertDateTime type="date" dateStyle="full" /> </h utputText> TestBean's getDate() returns new Date(); but i am getting a output like Mon May 19 19:05:47 IST 2008 how can i get the desired Output. i also tried pattern of the <f:convetDateTime like pattern="EEEE, MMMM d, yyyy" but no luck. please help.
|
 |
Tim Holloway
Saloon Keeper
Joined: Jun 25, 2001
Posts: 14480
|
|
|
Try dateStyle="long". The formats are in the JavaDocs (http://java.sun.com/j2se/1.5.0/docs/api/java/text/DateFormat.html)
|
Customer surveys are for companies who didn't pay proper attention to begin with.
|
 |
Dwijen Bhattacharjee
Greenhorn
Joined: Mar 31, 2008
Posts: 26
|
|
Hi, According to the JavaDocs * SHORT is completely numeric, such as 12.13.52 or 3:30pm * MEDIUM is longer, such as Jan 12, 1952 * LONG is longer, such as January 12, 1952 or 3:30:32pm * FULL is pretty completely specified, such as Tuesday, April 12, 1952 AD or 3:30:42pm PST so I have used Full. Now my question is--- Whatever I have done Is it enough or I am missing something to add in the code? because I am using type="date" but still I am getting the Time & date (which is the output of new date()).so that means it is not converting . Plese help ..
|
 |
 |
|
|
subject: f:convertDateTIme problem
|
|
|