Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Getting date in java

 
Sameera Abeysinghe
Ranch Hand
Posts: 104
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 113
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 4632
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
google java + datepicker
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic