Quantcast
Channel: VBForums - Java
Viewing all articles
Browse latest Browse all 54

Conversion failed date and/or time?

$
0
0
I want to insert date to the column Date of birth
Code:

"insert into table (firstname,lastname,dateofbirth) values(?,?,?)"
Code:

statement.setString(3,dob.getText());
dob is my JTextField name
Data type of that column is Datetime2
I have inserted two records ,but when I tried to insert another record it gives me error
Code:

Conversion failed when converting date and/or time from character string.

Viewing all articles
Browse latest Browse all 54

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>