Jagadeesh M
asked on
Calendar Object to date...
How do i conver a calender object to date....
i.e <%
Calendar fromTime = Calendar.getInstance();
fromTime.set(2006, 03, 28, 9, 0, 0);
System.out.println(fromTim e);
Calendar toTime = Calendar.getInstance();
toTime.set(2006, 04, 04, 0, 0, 0);%>
i'm passing fromTime and toTime to another jsp.....there i need to retrieve the objects into date-time formats
thank you.
i.e <%
Calendar fromTime = Calendar.getInstance();
fromTime.set(2006, 03, 28, 9, 0, 0);
System.out.println(fromTim
Calendar toTime = Calendar.getInstance();
toTime.set(2006, 04, 04, 0, 0, 0);%>
i'm passing fromTime and toTime to another jsp.....there i need to retrieve the objects into date-time formats
thank you.
Date d = cal.getTime();
Use SimpleDateFormat to specify the exact parts and their format you need.
;JOOP!
;JOOP!
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
>>i'm passing fromTime and toTime
Pass the value as a Date- more efficient and extensible
Pass the value as a Date- more efficient and extensible
http://forum.java.sun.com/thread.jspa?threadID=639559&messageID=3751105
this link could be help you
this link could be help you
(:>}