Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
The moose likes Beginning Java and the fly likes Problem regarding Date class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem regarding Date class" Watch "Problem regarding Date class" New topic

Problem regarding Date class

Chintan Shah

Joined: Jun 29, 2005
Posts: 27
I am developing one website..and i am using Date class in JSP.
The date class returns 1 for Monday, 2 for Tuesday.
Now what i want is that i need to reconvert 1 to Monday, 2 to Tuesday because..i need to compare all of them..and then show appropriately Monday, Tuesday on customers page. Please let me to compare..and how to show week days.
any help is appreciated . thanx in advance.
Chintan shah
ak pillai
Ranch Hand

Joined: Feb 11, 2006
Posts: 288
java.util.Date.getDay() is a deprecated method. You should use the java.util.Calendar.

check this API out:

java j2ee job interview questions with answers | Learn the core concepts and the key areas
Bear Bibeault
Author and ninkuma

Joined: Jan 10, 2002
Posts: 63548

Not much to do with JSP, so this has been moved to Java in General (beginner).

[Asking smart questions] [About Bear] [Books by Bear]
Alana Sparx
Ranch Hand

Joined: Feb 14, 2006
Posts: 121
Is there a solution involving

Sorry, last (first?) probable post today - close of day in my timezone zzzzz.....
I agree. Here's the link:
subject: Problem regarding Date class
It's not a secret anymore!