How to check a date in an access db?

Results 1 to 4 of 4

Thread: How to check a date in an access db?

  1. #1
    Karel Guest

    Default How to check a date in an access db?

    hi,<BR><BR>i&#039m a beginner in ASP programming. How can I get a message when a date in a form hasn&#039t the right format?? When I now want to add a new record with an invalid date, I get an ugly error message<BR><BR>Thanks

  2. #2
    Join Date
    Dec 1969
    Posts
    1,019

    Default RE: How to check a date in an access db?

    You could either validate the date client side with JavaScript or server side. If using server-side or client side vbscript try using the IsDate Function:<BR>if IsDate(request.form("thisdate")) then<BR>...save the date or whatever it is you do with the valid dates<BR>else<BR>response.write "Bad Date"<BR>end if<BR><BR>You could also response.redirect the user to the previous page and display an &#039Incorrect Date, please re-enter&#039 error. <BR><BR>

  3. #3
    Karel Guest

    Default RE: How to check a date in an access db? - thanks

    yep, that&#039s it!<BR>Thank a lot

  4. #4
    Join Date
    Dec 1969
    Posts
    11

    Default RE: How to check a date in an access db?

    When I move the date from the txet box to the date field in by database I get a hard error. No codes. It will not execute <BR>&#060;%rsDatabase("SQLDate")=Request("KeyedInD ate")%&#062;<BR><BR>Thanx<BR><BR>Len


Posting Permissions

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