Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1180
  • Last Modified:

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

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
daydreamer6565
Asked:
daydreamer6565
  • 3
  • 2
1 Solution
 
Gurvinder Pal SinghCommented:
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
 
daydreamer6565Author Commented:
Now the error is gone..bt the values are not displayed on the table..what cud be the issue..
0
 
Gurvinder Pal SinghCommented:
Please put the print statements to check if the data is correctly retrieved from database
0
 
daydreamer6565Author Commented:
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
 
daydreamer6565Author Commented:
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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now