How to strore Java Date to Mysql datetime...?
Posted
by user275843
on Stack Overflow
See other posts from Stack Overflow
or by user275843
Published on 2010-03-08T11:37:12Z
Indexed on
2010/03/08
11:51 UTC
Read the original article
Hit count: 200
can any body tell me how can i store Java Date to Mysql datetime...?
when i am trying to do so...only date is stored and time remain 00:00:00 in mysql date stores like this... 2009-09-22 00:00:00
i want not only date but also time...like 2009-09-22 08:08:11 please help me....
EDIT----
i am using JPA(Hibernate) with spring mydomain classes uses java.util.Date but i have created tables using handwritten queries...
this is my create statement
CREATE TABLE ContactUs (id BIGINT auto_increment, userName VARCHAR(30), email VARCHAR(50), subject VARCHAR(100), message VARCHAR(1024), messageType VARCHAR(15), contactUsTime datetime, primary key(id))TYPE=InnoDB;
© Stack Overflow or respective owner