update news set news.post_date = TIMESTAMPADD(HOUR,14,news.post_date) where TIME(news.post_date) = TIME("00:00:00");
by the way one more thing, If you are using Hibernet to access your database (As I was doing) dont forget to change the temporal type to TimeStamp. Sample code is as follows
@Column(name = "post_date")
@Temporal(TemporalType.TIMESTAMP)
private Date postDate;
private Date postDate;
Thats it.
No comments:
Post a Comment