• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Date formatting

 
kevin schmidt
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 1492
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Kevin,
Try the following.

Enjoy,
Manfred.
 
Margaret Tan
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 85
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic