Date variables...
Hi All,
I am trying to utilize a date stored in the database and then compare it within a dropdown menu so that date will be specified. I have used the following command to split the date:
rsDate = oRSbt("DueDate")
DateArray = Split(rsDate,"/")
I am then using the part in the array to make up the date in three drop down boxes. I have successfully done the day and month but I am have terrible trouble with the year. I am using the following code:
<% BeginYear = Application("PAST_YEAR")
CurrentYear = Application("CURRENT_YEAR")
EndYear = Application("NEXT_YEAR") %>
<select name="rsYear" class="f" tabindex="7">
<option value="<%=BeginYear%>"<% if DateArray(2) = BeginYear then Response.Write(" selected") end if %>><%=BeginYear%></option>
<option value="<%=CurrentYear%>"<% if DateArray(2) = CurrentYear then Response.Write(" selected") end if %>><%=CurrentYear%></option>
<option value="<%=EndYear%>"<% if DateArray(2) = EndYear then Response.Write(" selected") end if %>><%=EndYear%></option>
</select>
However with this code the current year does not get selected in the drop down box...
Any ideas anyone
With many thanks for your time and assistance,
Paul J
|