Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JDBC and Relational Databases
storing date in database
jen plecerda
Greenhorn
Posts: 4
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
hi!
can anyone help me how to store a
string
that i converted as a
java
date in a database?..im using mysql as a database. Thanks in advance!!!
Ricky Martaputra
Ranch Hand
Posts: 42
posted 17 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
try to use PreparedStatement.
String query = "INSERT INTO A(CREATED_DATE) VALUES ?"; PreparedStatement ps = connection.preparedStatement(query); ps.setDate( 1 , [your date]) ps.execute();
Consider Paul's
rocket mass heater
.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Date Format
Date format
Date or Timestamp?
conversion from Date ojbect to Date object
EntityManager.find() returns null
More...