day from date
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Akshay_Kumar
Posted On:   Friday, March 14, 2003 09:30 PM

how do i get day from a date

Re: day from date

Posted By:   paolo_cordova  
Posted On:   Saturday, March 15, 2003 09:53 AM


You can try this if your date variable name is "date":

java.sql.Date date = new java.sql.Date(); //example

Calendar cal = new GregorianCalendar();
cal.setTime(date);
int day = cal.get(cal.DAY_OF_MONTH);


explore other options too. just view javaDoc for Calendar.


Re: day from date

Posted By:   eimi_nos  
Posted On:   Friday, March 14, 2003 09:56 PM

You can use java.text.DateFormat or java.util.Calendar.
About | Sitemap | Contact