An easy way would be to use a page property to return the formatted date 
string.

Ex:
<span jwcid="@insert" value="ognl:messages.format('currentServerDateAndTime', 
page.currentDateTime">Current server date and time</span>

and on the page class/
public String getCurrentDateTime() {
    SimpleDateFormat df = new SimpleDateFormat("MMMM d yyyy");
    return df.format(new java.util.Date());
}


--ERic

On Wednesday 03 May 2006 09:40, Mark wrote:
> Hi,
>
> is there an easy way to pick the desired date format when using the
> message-bindings?
> In my example I have this in my html file:
> <span jwcid="@Insert"
> value="ognl:messages.format('currentServerDateAndTime', new
> java.util.Date())">Current server date and time: June 26 2005</span>
>
> The german resource entry looks like this:
> currentServerDateAndTime=Aktuelle Serverzeit: {0}
>
> The result is this:
> Aktuelle Serverzeit: 03.05.06 00:09
>
> This seems to be the short date format. What is the easiest way to
> change the date format to medium or long, so I can get the seconds, etc?
>
> Thanks,
>
> MARK
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]

Attachment: pgpeg0D6lLw22.pgp
Description: PGP signature

Reply via email to