Solved

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

Posted on 2012-04-03
5
988 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

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…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn one way to get user input in Java. Introduce the Scanner object: Declare the variable that stores the user input: An example prompting the user for input: Methods you need to invoke in order to properly get  user input:
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.

729 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