This week's giveaway is in the EJB and other Java EE Technologies forum.
We're giving away four copies of EJB 3 in Action and have Debu Panda, Reza Rahman, Ryan Cuprak, and Michael Remijan on-line!
See this thread for details.
The moose likes Swing / AWT / SWT and the fly likes Getting date in java Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Getting date in java" Watch "Getting date in java" New topic
Author

Getting date in java

Sameera Abeysinghe
Ranch Hand

Joined: Nov 15, 2004
Posts: 104
Hi all,
I know bit of vb.
So I will try to explain this in Visual Basic
In vb there is a component called calendar control that enable s you to get the date very easily, what I need is the corresponding java components for this or in other words
An component or a way to get the date very easily.
Note that I am not talking about system date
It has to out put any date we like ok .
Thanks
jefff willis
Ranch Hand

Joined: Sep 29, 2004
Posts: 113
Not sure exactly what you're looking for...here are some code snippits:


This one will output the current time in the format specified.



This one will print out any date you like:


You can play with the output format with both examples.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
google java + datepicker
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Getting date in java
 
Similar Threads
access vb components in java
How to implement Class Diagram in VB
VB client to a Session Bean
how to read contents from an excel sheet using java
Automate Excel Loading into Database