I have a Date which is coming like this Thu Dec 31 16:00:00 EST 1969.
So i just need to add one day in this so that i will get Thu Jan 01 16:00:00 EST 1970.
any idea with java ?
I have a Date which is coming like this Thu Dec 31 16:00:00 EST 1969.
So i just need to add one day in this so that i will get Thu Jan 01 16:00:00 EST 1970.
any idea with java ?
If you use Java 8, you could use ZonedDateTime.
DateTimeFormatter dtf = DateTimeFormatter.ofPattern("EEE MMM dd HH:mm:ss zzz yyyy");
ZonedDateTime zonedDateTime = ZonedDateTime.parse("Wed Dec 31 16:00:00 EST 1969", dtf);
zonedDateTime = zonedDateTime.plusDays(1);
System.out.println(dtf.format(zonedDateTime));