This week's book giveaways are in the Refactoring and Agile forums.
We're giving away four copies each of Re-engineering Legacy Software and Docker in Action and have the authors on-line!
See this thread and this one for details.
Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How to convert Java Date into Unix Time?

 
ahmad mudassar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
How can a java Date be converted into Unix Time, Is there any API function available for that?
Any help appreciated.
Thanks
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As the API documentation says, Date.getTime() "returns the number of milliseconds since January 1, 1970, 00:00:00 GMT represented by this Date object.
". Hope this is what you wanted.
Might I suggest, though, that a question that can be answered simply by reading the API is not really for the advanced forum?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic