File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Head First Android
this week in the
JDBC and Relational Databases
storing date in database
Joined: Mar 02, 2007
Mar 04, 2007 19:43:00
can anyone help me how to store a
that i converted as a
date in a database?..im using mysql as a database. Thanks in advance!!!
Joined: Apr 04, 2005
Mar 05, 2007 08:28:00
try to use PreparedStatement.
String query = "INSERT INTO A(CREATED_DATE) VALUES ?"; PreparedStatement ps = connection.preparedStatement(query); ps.setDate( 1 , [your date]) ps.execute();
subject: storing date in database
Date or Timestamp?
conversion from Date ojbect to Date object
EntityManager.find() returns null
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2015