how to get day on particular date

Reply

Join Date: Nov 2007
Posts: 31
Reputation: gauravmishra has a little shameless behaviour in the past 
Solved Threads: 0
gauravmishra gauravmishra is offline Offline
Light Poster

how to get day on particular date

 
0
  #1
Dec 18th, 2007
hi
i created a html form in which i took a date as input now how can i determine the day(sunday or monday etc) on that particular date .
Reply With Quote Quick reply to this message  
Join Date: Feb 2006
Posts: 2,441
Reputation: masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of masijade has much to be proud of 
Solved Threads: 260
Moderator
masijade's Avatar
masijade masijade is online now Online
Nearly a Posting Maven

Re: how to get day on particular date

 
0
  #2
Dec 18th, 2007
Parse the String to a Date using SimpleDateFormat, initiate a Calendar with that date, then use the get(int) method of the Calendar.

See the API docs for SimpleDateFormat and Calendar/GregorianCalendar.
Java Programmer and Sun Systems Administrator

----------------------------------------------

Debugging is twice as hard as writing the code in the first place. Therefore, if you write the code as cleverly as possible, you are, by definition, not smart enough to debug it.
--Brian Kernighan
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC