Change Date Color to Red in ASP

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ttwdjr
    New Member
    • Oct 2006
    • 1

    Change Date Color to Red in ASP

    I have a pruchasing DB and I am trying to change the date on a page to display Red if it is within 10 days of the current date, i am really struggling with it. Here is my code, does anyone know a simple way of doing it. It pulls the date from a SQL DB.

    <%if RS("requested_s hip_date")<>"" then%>
    Project or store opening equipment due date<br>
    <input type="text" name="shipDate" size="20"
    value="<%=RS("r equested_ship_d ate")%>" class="inputRea d" readonly>

    <%end if%>
  • sharmanic2002
    New Member
    • Oct 2006
    • 6

    #2
    <%if RS("requested_s hip_date")<>"" then%>
    Project or store opening equipment due date<br>
    <input type="text" name="shipDate" size="20"
    value="<%=RS("r equested_ship_d ate")%>" class="inputRea d" readonly>
    <%
    elseif
    (DateDiff("d",D ate,RS("request ed_ship_date") < 10 then
    %>
    <input type="text" name="shipDate" size="20"
    value="<%=RS("r equested_ship_d ate")%>" class="inputRea d" readonly style="color: #FF0000; font-weight: bold">
    <%end if%>
    <%end if%>

    Check and reply...

    Comment

    Working...