You could write a method that takes the Date and a format and returns the
String using the SimpleDateFormat approach.  Something like this:

public String formatDate(java.util.Date myDate, String myFormat) {
    // format ex: "yyyy-MM-dd"
    return (new SimpleDateFormat(myFormat)).format(MyDate);
}

Dan

> ----------
> From:         Vijay Eranti[SMTP:[EMAIL PROTECTED]]
> Reply To:     Vijay Eranti
> Sent:         Wednesday, March 31, 1999 2:36 PM
> To:   [EMAIL PROTECTED]
> Subject:      Suggest the best way to include formatting info in
> displaying presentation data using display tag
>
> The display tag of JSP seems doesnt have any means of including
> formatting information for data.
>
> for instance
>
> <DISPLAY property="customer:startDate">
>
> Is there any way that I can specify the format of my value in the
> display tag like
>
> <DISPLAY property="customer:startDate" format="MM/DD/YYYY">
>
>
> The only way it seems for me for the time being is to create special
> properties in the customer bean like displayStartDate which should
> format the info and give it to the bean.
>
> Regards
> Vijay
>
> ==========================================================================
> =
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the
> body
> of the message "signoff JSP-INTEREST".  For general help, send email to
> [EMAIL PROTECTED] and include in the body of the message "help".
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to