Comparing two dates problem

Results 1 to 2 of 2

Thread: Comparing two dates problem

  1. #1
    Jason Guest

    Default Comparing two dates problem

    I have a text field where a user would enter a date. On the processing page, I want to check and make sure the date entered is either the current date or greater. Im trying to do this:<BR>if request.form("Date") &#060; date() then &#039;display error message<BR><BR>its not working. How do i do this?

  2. #2
    Join Date
    Dec 1969

    Default Use CDATE... both convert the string the user typed in to a date *and* check to make sure it is a date.<BR><BR>If CDate(Request("whatever")) = Date( ) Then ...<BR><BR>(You can also use isDate() to test before converting, if you prefer.)<BR><BR>

Posting Permissions

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