• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Liutauras Vilda
  • Campbell Ritchie
  • Tim Cooke
  • Bear Bibeault
  • Devaka Cooray
Sheriffs:
  • Jeanne Boyarsky
  • Knute Snortum
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Ganesh Patekar
  • Stephan van Hulst
  • Pete Letkeman
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Ron McLeod
  • Vijitha Kumara

Any Alternative for this CODE !!!!!!  RSS feed

 
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • 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
  • Quote
  • Report post to moderator
Try this (dt1 is earlier date)
 
Swapna Agarwal
Ranch Hand
Posts: 37
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Wow..........Excellent........what a simple logic.That is my exact requirement.
Thank you so much,Thanks to JavaRanch Forums.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!