468,765 Members | 801 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,765 developers. It's quick & easy.

Type mismatch: 'FormatDateTime'

syedshaffee
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

Expand|Select|Wrap|Line Numbers
  1. dim i
  2. dim checkboxValue
  3. dim TextBoxValue
  4.  
  5. dim Count
  6. dim Count1
  7. dim postion
  8. dim postion1
  9. position=0
  10. postion1=0
  11. i=0
  12. Checkbox1= Request.Form("same")
  13. Comments=Request.Form("Comments")
  14. strDate=Request.Form("Date")
  15. a=Split(Comments ,",")
  16. c=Split(strDate,",")
  17. b=Split(Checkbox1,",") 
  18.  
  19. TextBoxValue=UBound(a)
  20. checkboxValue=UBound(b)
  21. for i=0 to  checkboxValue-1 step 1
  22. if b(i)<>"" then
  23. 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) +"');"
  24. else
  25. exit for
  26. end if
  27. next
  28.  
  29.  
Feb 10 '12 #1
1 3944
Rabbit
12,515 Expert Mod 8TB
You should double check what formatdatetime is returning against the data type in your table.
Feb 10 '12 #2

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

1 post views Thread by C.L. K3endricks | last post: by
1 post views Thread by Angus Comber | last post: by
1 post views Thread by Gaffar | last post: by
reply views Thread by Mike Eaton | last post: by
1 post views Thread by Dean R. Henderson | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.