This week's book giveaway is in the Design forum.
We're giving away four copies of Building Microservices and have Sam Newman on-line!
See this thread for details.
The moose likes JSP and the fly likes Need date Format help Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » JSP
Bookmark "Need date Format help" Watch "Need date Format help" New topic

Need date Format help

Leena Diwan
Ranch Hand

Joined: Jun 18, 2001
Posts: 351
Hello Friends,

I need to mormat my date valye to get something like the following:
Sunday December 3rd, 2006 OR
Tuesday December 5th, 2006

I understand that one can give a custom format for date as per the SimpleDateFormat symbols. However, I did not find anything for achieveing the pattern in bold

Can you please help?


Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

the pattern in bold

Sorry but I can't see anything in bold in your message.
Can you explain which part you are talking about ?

[My Blog]
All roads lead to JavaRanch
Leena Diwan
Ranch Hand

Joined: Jun 18, 2001
Posts: 351
Originally posted by Leena Diwan:
Sunday December 3rd, 2006 OR
Tuesday December 5th, 2006

Sorry for that.. Now its bold
[ March 02, 2007: Message edited by: Leena Diwan ]
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63231

There is no pattern that will emit 1st, 2nd, 3rd and so on. You'll need to be satisfied with 1, 2, 3 ...

[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Karthik Srikanti

Joined: Sep 20, 2006
Posts: 11
Like Bear said, there is no pattern to give you 3rd, 6th like that. But if its absolutely necessary for your project you can use some javascript scripting with logic to change the value after its displayed on the page. You can have it at the end of the page so it fires before the page is loaded.

aman hindustani
Ranch Hand

Joined: Jun 15, 2006
Posts: 57
leena ...if you use calenders(javascripts css files) may find the desired result
I agree. Here's the link:
subject: Need date Format help
It's not a secret anymore!