Hi all, i want to know how i can convert a string into a date data type. String date=request.getParameter("txtGraduationdate"); well in my backend i created the field as "date" data type. So how will i be able to convert this. Thanks and Regards, vikram
Originally posted by vikramnp: Hi all, i want to know how i can convert a string into a date data type. String date=request.getParameter("txtGraduationdate"); well in my backend i created the field as "date" data type. So how will i be able to convert this. Thanks and Regards, vikram
homeboy
Dharmesh Chheda
Ranch Hand
Joined: May 08, 2001
Posts: 204
posted
0
Hello vikramp the second way is that you can use the StringTokenizer class also ------------------ IBM Certified WebSphere Application Server V3.5 Specialist
This is the way I convert it. I wish there was an easier way too!
Calendar.getTime() returns a Date object, then use getTime() on the Date object which returns milliseconds, which you can use in a Date constructor to create a new Date. Jamie
[This message has been edited by Jamie Robertson (edited October 15, 2001).] [This message has been edited by Jamie Robertson (edited October 15, 2001).]