Solved

Error:The syntax of the string representation of a datetime value is incorrect.

Posted on 2012-04-03
5
886 Views
Last Modified: 2012-04-06
While retrieving all values from database to a table i am getting the following error-
java.sql.SQLDataException: The syntax of the string representation of a datetime value is incorrect.
Attaching the code for retrieving the values to a table..
Also attaching the code of create statement during table creation..
Pls help..
show-Code.txt
create-stmt.txt
0
Comment
Question by:daydreamer6565
  • 3
  • 2
5 Comments
 
LVL 40

Accepted Solution

by:
gurvinder372 earned 500 total points
ID: 37804748
you date columns are varchar, which is why it is not coming as date

either
make those columns as date
or
fetch them as string and then convert to date
0
 

Author Comment

by:daydreamer6565
ID: 37805395
Now the error is gone..bt the values are not displayed on the table..what cud be the issue..
0
 
LVL 40

Expert Comment

by:gurvinder372
ID: 37805476
Please put the print statements to check if the data is correctly retrieved from database
0
 

Author Comment

by:daydreamer6565
ID: 37809521
attaching the code pls suggest necessary changes so that it gets displayed in the table
also suggest the changes in my date code so as to print it in proper format..
show.txt
0
 

Author Comment

by:daydreamer6565
ID: 37810154
I got the values inside my table ..
now the issue is regarding Date only how to get the correct format?
pls help
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.

828 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question