www.webdeveloper.com
Results 1 to 3 of 3

Thread: Date

  1. #1
    Join Date
    Dec 2002
    Location
    South Africa
    Posts
    12

    Question Date

    Hi All

    Ive got a login page , and what i want to happen is when the user logs in it checks an expiry date which is stored in a Access DB , and if the account has expired it prompts the user and then redirects the user to another page.

    This is the code that i tried but it didnt seem to work:

    <CODE>
    if rsDate.fields("ExpiryDate").value = Now() then
    response.write "Sorry your account has expired"
    response.redirect "expired.htm"
    end if
    </CODE>

    Thanks

  2. #2
    Join Date
    Jan 2003
    Location
    Chicago
    Posts
    8
    You probably want it to say less than instead of equal because it's not going to be the exact time down to the last second.

  3. #3
    Join Date
    Dec 2002
    Location
    South Africa
    Posts
    12
    So my code should look something like this:

    <CODE>
    if rsDate.fields("ExpiryDate").value < Now() then
    response.write "Sorry your account has expired"
    response.redirect "expired.htm"
    end if

    </CODE>

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center



Recent Articles