简体   繁体   中英

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

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. All 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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM