开发者

Format date to show Day (e.g. Friday) using fmt tag in JSTL

开发者 https://www.devze.com 2023-04-07 04:30 出处:网络
I have a date object passed on to the JSP page as ${date}. I want to print the date in following format:

I have a date object passed on to the JSP page as ${date}. I want to print the date in following format:

Last logged in on Friday, September 23, 2011 on 11:32 PM EDT.

I cant get the Friday part and the EDT part. Al开发者_Python百科l I am able to successfully print is:

Last logged in on September 23, 2011 on 11:32 PM.

What are the additional options I need to include for printing the Day and Timezone? Thanks in advance.

PS: I am using fmt tag in JSTL.


Look at the java.util.SimpleDateFormat. That's the basis for the <fmt>

You sound like you want either a custom format or FULL.

0

精彩评论

暂无评论...
验证码 换一张
取 消