Pages
Home
Legal
Info
HowTos
Code
Publications
Music
Finance
Links
Comics
Donate
04/07/2012
[Java] Calendar Date to Timestamp
In Java you can convert a
Date
to a
Timestamp
simply by:
Date date = Calendar.getInstance().getTime();
This will return the current date, then:
Timestamp timestamp = new Timestamp(date.getTime());
where
date.getTime()
will return a
long
.
No comments:
Post a Comment
With great power comes great responsibility
Newer Post
Older Post
Home
View mobile version
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment
With great power comes great responsibility