Gidday Carol,
I use the JDBC Format available in java.sql.Date this gives me a
standard format across Locales
// JDBCFormat = yyyy-mm-dd
// USAGE: Date date = TDate.JDBCFormatToDate("2000-06-20");
public final class TDate {
public final static java.util.Date JDBCFormatToDate(String
strJDBCFormat) {
return java.sql.Date.valueOf(strJDBCFormat);
}
// This ensures that no one can create instances of the object.
private TDate(){}
}
cheers pb...
Carol Geng wrote:
>
> Hi,
> I am new to java, and in my servlet, I need to convert string to date, How
> to do that?
>
> Thanks a lot,
>
> Carol
>
> ___________________________________________________________________________
> To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
> of the message "signoff SERVLET-INTEREST".
>
> Archives: http://archives.java.sun.com/archives/servlet-interest.html
> Resources: http://java.sun.com/products/servlet/external-resources.html
> LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
> .
--
--------------------------------------------------------------------------------------
Peter Blakeley
[ coolcat.com.au ]
this(); // call my birth to check that all that is needed is.
;-})
.
___________________________________________________________________________
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff SERVLET-INTEREST".
Archives: http://archives.java.sun.com/archives/servlet-interest.html
Resources: http://java.sun.com/products/servlet/external-resources.html
LISTSERV Help: http://www.lsoft.com/manuals/user/user.html