This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes How to convert now date to Timestamp ?? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to convert now date to Timestamp ??" Watch "How to convert now date to Timestamp ??" New topic
Author

How to convert now date to Timestamp ??

majid nakit
Ranch Hand

Joined: Jun 26, 2001
Posts: 164
Hi,
can you please tell me how to convert the current date (now) to Timestamp ?
thanks
your help is appreciated
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41060
    
  43
Try "new java.sql.Timestamp(System.currentTimeMillis())"


Ping & DNS - my free Android networking tools app
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: How to convert now date to Timestamp ??
 
Similar Threads
How to convert timeStamp into corresponding date.
add 10 days to currentDate in java.util.Date or cast to Calendar?
How do i convert a Date object into a Timestamp object ?
How do i convert a Date object into a Timestamp object ?
How do i convert a Date object into a TimeStamp object