Hi
I need to generate a list of dates between 2 dates for example:
1/7/2003
2/7/2003
3/7/2003
...
30/7/2003
it's trivial right ?
here is my code and I don't know why I am getting these results:
01/07/2003
7/2/2003
2/8/2003
any ideas why it is doing it ? I am in Australia so my server date settings different to standard US format it's day first then month ...
I need to generate a list of dates between 2 dates for example:
1/7/2003
2/7/2003
3/7/2003
...
30/7/2003
it's trivial right ?
here is my code and I don't know why I am getting these results:
01/07/2003
7/2/2003
2/8/2003
Code:
<%
Option Explicit
Dim startDate, endDate, currDate, temp
startDate = "01/07/2003"
endDate = "30/07/2003"
%>
<table border=1>
<tr>
<td>Stop Date</td>
</tr>
<%
currDate = startDate
do while DateDiff("d",currDate,endDate) > 0
%>
<tr>
<td><a><% Response.Write currDate%></a></td>
</tr>
<%
temp = DateAdd("d", 1, Day(currDate) & "/" & Month(currDate) & "/" & Year(currDate))
currDate = temp
loop %>
</table>
any ideas why it is doing it ? I am in Australia so my server date settings different to standard US format it's day first then month ...