Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Unix timestamp to Date

 
Peter Tomas
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Author: osilekpl
Jul 12, 2001 7:16 AM

I need to convert Unix timestamp to Date I get this info from database and i need this int as a date 965914718
Can anybody help me how to convert this.
I need this ASAP.
thanx guys.
 
Anoop Krishnan
Ranch Hand
Posts: 163
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hai Peter
What about using the constructor
java.util.Date(long date)
Allocates a Date object and initializes it to represent the specified number of milliseconds since the standard base time known as "the epoch", namely January 1, 1970, 00:00:00 GMT.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic