Finding epoch seconds and separate yera,month,day,hr,min and seconds
Using this below code, I got the timestamp..
Calendar cal = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT_NOW);
Output of this code is,
Then I have split this things and got the year,month,day,hours,min and seconds separately. My need is using this details ( year,month,day,hours,min and seconds) I would like to know the epoch seconds.
Like wise using this epoch second I would like to know the year,month,day,hours,min and seconds separately.
Is there any functions available in java to resolve my needs.
Thank you frds..