Blind Date Tonight! Or isDate( ) Trouble.

Results 1 to 3 of 3

Thread: Blind Date Tonight! Or isDate( ) Trouble.

  1. #1
    Join Date
    Dec 1969

    Default Blind Date Tonight! Or isDate( ) Trouble.

    This code works for inserting the date from three drop down lists into a varchar field, but it leaves an SQL smalldatetime field &#060;null&#062;.<BR><BR>Can it go into a smalldatetime field as well?<BR><BR>ddstr = request.form("month") & "/" &request.form("day") & "/" & request.form("year")<BR>if isDate(ddstr) then<BR><BR>set rst=server.createobject("adodb.recordset")<BR>rst. open "rfqcreation",conn,2,2<BR>rst.addnew<BR>rst("dd")= ddstr<BR>rst.update<BR>end if

  2. #2
    Gilda Radna Guest

    Default NEVER MIND !

    Never Mind, I&#039ve been editing the wrong script!

  3. #3
    MG Guest

    Default RE: Blind Date Tonight! Or isDate( ) Troubl

    Try this<BR><BR>ddstr = request.form("month") & "/" &request.form("day")& "/" & request.form("year")<BR>ddstr = cdate(ddstr)<BR>if isDate(ddstr) then<BR><BR>set rst=server.createobject("adodb.recordset")<BR>rst. open "rfqcreation",conn,2,2<BR>rst.addnew<BR>rst("dd")= ddstr<BR>rst.update<BR>else<BR>response.write "Not a date"<BR>end if

Posting Permissions

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