Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Get "Timestamp" (Millis) from a specific date

Status
Not open for further replies.

zoomby

Programmer
Aug 5, 2002
60
DE
Hi!

I want to get the milliseconds since the unix epoche from a specific date. The example above should work, but the method getTimeInMillis() can't be found.
What's wrong with it?
Is there another way to get the millis?

GregorianCalendar start=new GregorianCalendar(2002,8,30);
long Millis = start.getTimeInMillis();

Bye
Chris
 
Date d = new Date();
long nowInMillis = d.getTime();

Ben
 
Thanks!

But how do I get the Millis of a specific date,
like 2002-2-20?

Bye
Chris
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top