MySql DATETIME to java.util.Calendar -


I managed to store a calendar in a message DATETIME field to get this value managed in Java

  entredate = calendar.Ast instance (timezone. Gate time zone ("UT")); Entry.date.setTime (rs.getDate (DBBLogEntries.entDate));   

Ententade is a Java. The value in the Util.Calendar database is: '2012-07-07 07:18:46' I store all the dates in one unique timezone in DB

The problem is that it brings the date but I do not like Brinang for a while. Will anybody participate? Thanks in advance. Probably because of Java ( YYYY-MM-DD HH: MM: SS

)

link:

You can use it as follows.

  java.util.Date.dt = new java.util.Date (); Java.text.SimpleDateFormat sdf = new java.text.SimpleDateFormat ("yyyy-MM-dd HH: mm: SS"); String datetime = sdf.format (dt);    

Comments

Popular posts from this blog

java - NullPointerException for a 2d Array -

python - Assemble mpeg file unable to play in mediaplayer -

c# - NameSpace Manager or XsltContent to parse aspx page -