A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
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();
With a little knowledge, a
cast iron skillet
is non-stick and lasts a lifetime.
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-2014