Top "Java.util.date" questions

Through Java 7, the official class for representing a moment in time, using a thin wrapper around the number of milliseconds from epoch (1970-01-01).

Convert java.util.Date to String

I want to convert a java.util.Date object to a String in Java. The format is 2010-05-30 22:15:52

java date formatting java.util.date
Calculating the difference between two Java date instances

I'm using Java's java.util.Date class in Scala and want to compare a Date object and the current time. …

java date time timedelta java.util.date
How to set time zone of a java.util.Date?

I have parsed a java.util.Date from a String but it is setting the local time zone as the …

java date timezone java.util.date
How to subtract X day from a Date object in Java?

I want to do something like: Date date = new Date(); // current date date = date - 300; // substract 300 days from current date …

java date datetime calendar java.util.date
How to add minutes to my Date

I have this date object: SimpleDateFormat df = new SimpleDateFormat("yyyy-mm-dd HH:mm"); Date d1 = df.parse(interviewList.get(37).getTime()); value …

java date calendar simpledateformat java.util.date
Get the current date in java.sql.Date format

I need to add the current date into a prepared statement of a JDBC call. I need to add the …

java jdbc java.util.date
Convert java.util.date default format to Timestamp in Java

The default format of java.util.date is something like this "Mon May 27 11:46:15 IST 2013". How can I convert this into …

java date time timestamp java.util.date
How to convert ZonedDateTime to Date?

I am trying to set a server agnostic date time in my database and I believe the best practice to …

java java-8 java.util.date datetime-conversion zoneddatetime
does System.currentTimeMillis() return UTC time?

I want to get the current UTC time in millis. I searched google and got some answers that System.currentTimeMillis() …

java android datetime utc java.util.date
How to convert Joda-Time DateTime to java.util.Date and vice versa?

Is it possible to do that? If yes, then how do I do the conversion from Joda-Time to Date and …

java datetime jodatime java.util.date