Compare Date

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Fary4u
    Contributor
    • Jul 2007
    • 273

    Compare Date

    Hi

    i've got the multipule date values in my database, i just want to show only those upto date one's

    so it mean compare & then dispaly record, i've done the coding it's fine but when i do the if condition then it's not displaying the rest of record,

    [PHP]

    FOR EXPALME

    2/14/2008
    2/15/2008
    2/20/2008
    2/22/2008

    TODAY DATE IS 2/15/2008 it's should display 2 record
    ----------------------------------------------------------------
    while not rsprod.EOF

    dim td
    end_date = rsprodinx("expi re_date")

    if end_date <= Now() then
    response.write "out off date"
    else
    response.write "up to Date"
    end if

    rsprod.MoveNext
    wend

    [/PHP]

    i want to show records all in the database so any body know what i have 2 do to solve this problem

    thanks in advance for reply.
  • DrBunchman
    Recognized Expert Contributor
    • Jan 2008
    • 979

    #2
    Are you certain that all the records that you expect are being returned by your query?

    Comment

    • Fary4u
      Contributor
      • Jul 2007
      • 273

      #3
      Yes that works fine

      but if i need to do again EOF & shows the records wd in true statment then what's the possiblity ?

      Comment

      • DrBunchman
        Recognized Expert Contributor
        • Jan 2008
        • 979

        #4
        Sorry Fary4u, I don't quite understand the question.

        You want to display the records which pass the If condition but not display the others?

        Perhaps you could give a sample of the output you are expecting.

        Dr B

        Comment

        Working...