• Post Reply Bookmark Topic Watch Topic
  • New Topic

Extract date parts from time stamp

 
Meir Yan
Ranch Hand
Posts: 599
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all
I have this line : String timestamp = String.valueOf(System.currentTimeMillis());
that gives me the current timestamp but now I need to extract from this timestamp
the day parts for example if my current timestamp is : 1154852914737 so it will be extracted to
nowYear:2006
nowMonth:8
nowDay:6
nowHour:11
nowMinute:30
nowSecond:2

thanks
 
Ben Souther
Sheriff
Posts: 13411
Firefox Browser Redhat VI Editor
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!