my dog learned polymorphism
The moose likes Beginning Java and the fly likes How to generate Sysdate using Java? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "How to generate Sysdate using Java?" Watch "How to generate Sysdate using Java?" New topic

How to generate Sysdate using Java?

niranjan smith

Joined: Sep 05, 2008
Posts: 4

You can format the date as per your requirement. Here I have tried to print the milliseconds also.....Keep Rocking!!

[edit]Add code tags. CR[/edit]
[ September 05, 2008: Message edited by: Campbell Ritchie ]
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46437
Welcome to JavaRanch
Please find the code button; I have edited your post so you can see how much better it looks, and the code is easier to read.

Do you have a particular question? It isn't obvious from your post.
Or is this a reply to somebody else's question? If so, it really ought to have been posted as a reply on their thread.
And I shall have to send you an important administrative private message.

I agree. Here's the link:
subject: How to generate Sysdate using Java?
It's not a secret anymore!