File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Date formatting Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Date formatting" Watch "Date formatting" New topic
Author

Date formatting

kevin schmidt
Ranch Hand

Joined: Aug 24, 2001
Posts: 85
Hi,
I want to display a range of dates like this:
Saturday, October 13, 2001 through Friday, October 19, 2001
Now, as soon as the date changes to the 21st, then it changes to:
Saturday, October 20, 2001 through Friday, October 26, 2001
Is there a simple way of doing this? TIA.
kevin
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Kevin,
Try the following.

Enjoy,
Manfred.
Margaret Tan
Greenhorn

Joined: Sep 14, 2001
Posts: 20
I try running this program. But this is what i get
prompt -> java A
Mon Oct 22 22:11:14 PDT 2001
Saturday, 27 October, 2001 to Friday, 26 October, 2001
Wed Oct 17 22:11:14 PDT 2001
Saturday, 20 October, 2001 to Friday, 19 October, 2001

the ending friday is one day before the beginning saturday???
What's wrong? Thanks in advance
kevin schmidt
Ranch Hand

Joined: Aug 24, 2001
Posts: 85
Thanks Manfred, I managed to get this program to work. Now to answer your question Margaret. I entered the program exactly as shown on the screen and it worked perfectly for me. Thanks for all the help!!
Kevin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Date formatting
 
Similar Threads
Calendar problem
Print the first Friday of every month...
Enum doubt
Question regarding the use of Calendar
Get current week date