|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
|
Be the architects of evolution and help create the mobile internet future. It’s your move---enter to win here! |
|
#1
|
|||
|
|||
|
I need a function that returns the name of the day when I give it a date.
I believe I need a function in the calender class, but can't find it at SUN... maybe this is faster.. example: give_day_name("2002-09-11") returns "wednesday". Suggestions please! Erwin |
|
#2
|
|||
|
|||
|
Calendar.get(Calendar.DAY_OF_WEEK) will return 1 for sunday, 2 for monday, etc. They're actually constants, Calendar.SUNDAY, Calendar.MONDAY, etc.
|
|
#3
|
|||
|
|||
|
Thanks Bricker42, that's just what I needed!
Erwin |
|
#4
|
|||
|
|||
|
More help please, I can;y get this to work :-(
Erwin |
|
#5
|
|||
|
|||
|
Please Help! :-(
This is the error: org.apache.jasper.JasperException: Unable to compile class for JSPNote: sun.tools.javac.Main has been deprecated. An error occurred at line: 326 in the jsp file: /Rubriek_adv.jsp Generated servlet error: /opt/jakarta-tomcat-4.0.3/work/localhost/test/Rubriek_0005fadv$jsp.java:317: Invalid type expression. Calendar.get(Calendar.DAY_OF_WEEK) Suggestions Please! Erwin |
|
#6
|
|||
|
|||
|
I'm not sure why it's doing that. Can you tell me what you're trying to do? Maybe there's another way to get the info you want.
|
|
#7
|
|||
|
|||
|
I have a listbox in a page, containing dates. The user chooses a date to place an advertisement. To help him, I would like to show the name of the day next to the datre: example rows of the listbox:
17-09-2002 Tuesday 18-09-2002 Wednesday . . 22-09-2002 Sunday |
|
#8
|
|||
|
|||
|
Just change the code I gave you here [http://forums.devshed.com/showthrea...&threadid=43703] to have a different format (all the E's). Something like "MM-dd-yyyy EEEEEEEEEE", maybe.
|
|
#9
|
|||
|
|||
|
You';re my man! ;-)
Erwin |
![]() |
| Viewing: Dev Shed Forums > Programming Languages > Java Help > Name of the day |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|