This week's book giveaway is in the iOS forum.
We're giving away four copies of Classic Computer Science Problems in Swift and have David Kopec on-line!
See this thread for details.
Win a copy of Classic Computer Science Problems in Swift this week in the iOS forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to use calender  RSS feed

 
Ranch Hand
Posts: 32
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I need to display the current date and time inside a textbox. How do I do this? I have an instance of a zk textbox in my code:



Thanks,
Sony
 
Ranch Hand
Posts: 34
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Calendar.getInstance().getTime() gives the date object.
 
Ranch Hand
Posts: 276
Chrome Java Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Alternatively you can also use the java.util.Date class..
new java.util.Date() gives you the current date and time.
We go to Calendar class especially when we need to do some date time calculations. Nothing wrong in using it for getting the current date/time either.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!