• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Date formatting

 
Ranch Hand
Posts: 85
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Ranch Hand
Posts: 1492
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Kevin,
Try the following.

Enjoy,
Manfred.
 
Greenhorn
Posts: 20
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
The human mind is a dangerous plaything. This tiny ad is pretty safe:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic