wood burning stoves 2.0*
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 Murach's Java Servlets and JSP this week in the Servlets 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 know..how 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: 60774

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

[Asking smart questions] [Bear's FrontMan] [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.....
Don't get me started about those stupid light bulbs.
subject: Problem regarding Date class
Similar Threads
Array stuff again...
scheduled java Timer job
Manupilating Date
is this not suppose to give me date of the week?