Hi,
I tried to use the method you sugested, but the line
"java.sql.Date date = (java.sql.Date)
dateFormat.parse(dateString,position);"
is throwing java.lang.ClassCastException: java.util.Date.
Can you tell me how to get sql Date object ?
regards,
Keshava Murthy. S
----- 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:[EMAIL PROTECTED]>
> For additional commands, e-mail:
<mailto:[EMAIL PROTECTED]>
>
>
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>