aspose 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 | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: How to convert Java Date into Unix Time?
 
Similar Threads
convert unix milli seconds to java date :-)
How to convert Java Date into Unix Time?
Date conversion returns wrong value
ProcessBuilder
ProcessBuilder