Manning's Countdown to 2014
. Use discount code crdotd14 all month for 50% off every deal.
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
String query = "INSERT INTO A(CREATED_DATE) VALUES ?"; PreparedStatement ps = connection.preparedStatement(query); ps.setDate( 1 , [your date]) ps.execute();
It is sorta covered in the
JavaRanch Style Guide
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-2013