Solved

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

Posted on 2012-04-03
5
805 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Printing to a specific printer tray (HP 806dn printer) 3 83
Core Java. What output will be and why ? 6 66
groovy example issue 10 90
Arrays.asList  VS  ArrayList 4 44
For beginner Java programmers or at least those new to the Eclipse IDE, the following tutorial will show some (four) ways in which you can import your Java projects to your Eclipse workbench. Introduction While learning Java can be done with…
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…
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:
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

911 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

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now