Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Getting all dates between a date range
Message
From
06/03/2006 12:00:38
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
To
06/03/2006 10:04:22
Mike Cole
Yellow Lab Technologies
Stanley, Iowa, United States
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Miscellaneous
Thread ID:
01101704
Message ID:
01101744
Views:
14
This message has been marked as the solution to the initial question of the thread.
>Will that actually list the dates, or just the number of dates?

Hmm your question was not clear to me. It'd return day count between dates. I think no built-in thing to return those dates but you could simply loop. ie: in C#:
 private static ArrayList DaysBetweenDates(DateTime start, DateTime end)
 {
   ArrayList days = new ArrayList();
   DateTime startDate = start.Date;
   DateTime endDate   = end.Date;
   int daycount = (endDate - startDate).Days;
   for(int i=0;i<=daycount;i++)
   {
     days.Add(startDate.AddDays(i));
   }
   return days;
 }
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Reply
Map
View

Click here to load this message in the networking platform