File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes How to convert Java Date into Unix Time? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "How to convert Java Date into Unix Time?" Watch "How to convert Java Date into Unix Time?" New topic
Author

How to convert Java Date into Unix Time?

ahmad mudassar
Greenhorn

Joined: Dec 05, 2001
Posts: 3
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

Joined: Oct 30, 2001
Posts: 1970
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?


Betty Rubble? Well, I would go with Betty... but I'd be thinking of Wilma.<br /> <br />#:^P
 
I agree. Here's the link: jrebel
 
subject: How to convert Java Date into Unix Time?
 
Similar Threads
Date conversion returns wrong value
How to convert Java Date into Unix Time?
ProcessBuilder
ProcessBuilder
convert unix milli seconds to java date :-)