Hi Nataraj,
Thanks for your response.
I solved this by using the method - Date.valueOf(String str). Do you think
the method you defined will be more useful if I require to save time along
with Date.
regards,
keshav
----- Original Message -----
From: "K Nataraj" <[EMAIL PROTECTED]>
To: "'Turbine Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, November 13, 2002 6:06 PM
Subject: RE: Date comparison
> U can get the the date from VM like this..
>
> String date = parser.get("dateField");
>
> this u can convert to java.sql.Date using the
> SimeplDateFormatter class of java.text package .,
>
>
> a sample goes like this
>
> SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd"); // This
> yyyy-MM-dd is configurable..Refer jdk // //documentation for futher
> details..
> ParsePosition position = new ParsePosition(0);
> java.sql.Date date = (java.sql.Date)
dateFormat.parse(dateString,position);
> return date;
>
>
> Now u can compare the values as u wish..Hope this helps...
>
>
>
>
> --
> To unsubscribe, e-mail:
<mailto:turbine-user-unsubscribe@;jakarta.apache.org>
> For additional commands, e-mail:
<mailto:turbine-user-help@;jakarta.apache.org>
>
>
--
To unsubscribe, e-mail: <mailto:turbine-user-unsubscribe@;jakarta.apache.org>
For additional commands, e-mail: <mailto:turbine-user-help@;jakarta.apache.org>