• 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

Any Alternative for this CODE !!!!!!

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I do know there are some mistakes in my CODE, but treating this as psudo code, could any one give me the correct code?
My input:
startDate:03/24/2004
endDate: 02/29/2004
Expected output Should return only SUNDAY's between these 2 dates)
03/21/04
03/14/04
03/07/04
02/29/04

Here is my (psudo) CODE

These are the compilation errors:
[ edited to preserve formatting using the [code] and [/code] UBB tags -ds ]
[ March 26, 2004: Message edited by: Dirk Schreckmann ]
 
Ranch Hand
Posts: 4632
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try this (dt1 is earlier date)
 
Swapna Agarwal
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Wow..........Excellent........what a simple logic.That is my exact requirement.
Thank you so much,Thanks to JavaRanch Forums.
 
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic