Type mismatch: 'FormatDateTime'

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • syedshaffee
    New Member
    • Jan 2012
    • 91

    Type mismatch: 'FormatDateTime'

    hey people ,

    i'm stuck on this for a day or two this is my code . it is giving me Error Type:
    Microsoft VBScript runtime (0x800A000D)
    Type mismatch: 'FormatDateTime '
    please help on this

    Code:
    dim i
    dim checkboxValue
    dim TextBoxValue
    
    dim Count
    dim Count1
    dim postion
    dim postion1
    position=0
    postion1=0
    i=0
    Checkbox1= Request.Form("same")
    Comments=Request.Form("Comments")
    strDate=Request.Form("Date")
    a=Split(Comments ,",")
    c=Split(strDate,",")
    b=Split(Checkbox1,",") 
    			
    TextBoxValue=UBound(a)
    checkboxValue=UBound(b)
    for i=0 to  checkboxValue-1 step 1
    if b(i)<>"" then
    objRIMSConn.Execute "Insert into Eot_returned (Contract_no,Asset_id,Date_to_be_excepted,Comments) values ('" + Session("Contract_no") + "'," + b(i) + ",'" + FormatDateTime(c(i))+ "','"+ a(i) +"');"
    else
    exit for
    end if
    next
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You should double check what formatdatetime is returning against the data type in your table.

    Comment

    Working...