File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes How to use calender Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "How to use calender" Watch "How to use calender" New topic

How to use calender

sony vijay
Ranch Hand

Joined: Jun 27, 2010
Posts: 32

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:

Dinakar Kas
Ranch Hand

Joined: Jul 11, 2010
Posts: 34
Calendar.getInstance().getTime() gives the date object.
Vinoth Kumar Kannan
Ranch Hand

Joined: Aug 19, 2009
Posts: 276

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.

I agree. Here's the link:
subject: How to use calender
Similar Threads
date problem
saving the details in when i click next and previous buttons
Javascript Date Check
Getting current GMT date as Date object
Something about current time