Convert a specified date to a day

M

mavina

I'm trying to convert a date to the day of week.
I know how to do this for the current date, but i'm trying to get the
"day" for the "user specified Date".
For eg. i want to get the name of the day for the date "04/13/2006"

Any ideas??

Thanks!
 
V

Venkatesh

U can use Calendar

Calendar c = Calendar.getInstance();
c.setDate(<whatever date u want>)
c.get(Calendar.DAY_OF_WEEK)

-Venkatesh
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,432
Messages
2,571,682
Members
48,796
Latest member
Greg L.

Latest Threads

Top