A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Java in General
how to find monday in a selected date
Joined: Sep 10, 2009
Feb 21, 2011 02:21:28
when i select a date, i need to find sunday and monday for that particular week . can you give idea for this.
If you dont understand means, just consider am selecting a date. Then i have get start date and end date of a week
Joined: Apr 06, 2010
Feb 21, 2011 03:02:50
Well, it seems the first step is to get the day of the week for the date you're interested in. The
class can do that - look at the
method and the
constant in the Javadocs.
Once you've got that, you can roll the date forward/back the right number of days. The
method will do that for you.
I agree. Here's the link:
subject: how to find monday in a selected date
How to find day from the week using date format?
Create an Array of Weeks
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015