I have loaded the calendar in my LWUIT based UI. Thanks to this thread. It is neat.
when i select a certain date i want the calendar to close and the selected date to appear in my original form in dd-mmm-yyyy form.
I want to take this selected date, set the clock to 1200 hrs (afternoon) on that day and find the time in milliseconds elapsed between now and 1200 hrs on the selected date. something i have earlier asked here but for a desktop java applications using netbeans 7.1.2.
I find that methods like getInstance, getCalendar, setTime, are not supported in the LWUIT calendar. Are they? I can only have date = getDate(); but cant set the clock on that date.
Further, 1. How to select current time (now) in milliseconds. Will this work?
`Calendar today = Calendar.getInstance();
Date time_now = today.getTime();`
- If it will, How do i find the difference between the date selected by user and time_now. (supposing that i simply add (12*60*60*1000) to the above difference to compensate for inability to set the clock to mid-day.) The real problem is that, above two objects are date objects and i want the difference in milliseconds as a double or long variable.
Whats the solution. Thanks in advance.