By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
438,867 Members | 1,964 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 438,867 IT Pros & Developers. It's quick & easy.

Type mismatch: 'FormatDateTime'

syedshaffee
P: 91
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
Share this Question
Share on Google+
1 Reply


Rabbit
Expert Mod 10K+
P: 12,370
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.