commons-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Brad Balmer" <bbal...@peapod.com>
Subject RE: Help converting String to Timestamp
Date Fri, 14 Jan 2005 18:38:33 GMT
Thanks.  Looking at it for so long it looked normal to me.

-----Original Message-----
From: Kishore Senji [mailto:ksenji@gmail.com] 
Sent: Friday, January 14, 2005 12:01 PM
To: Jakarta Commons Users List; bbalmer@peapod.com
Subject: Re: Help converting String to Timestamp

On Fri, 14 Jan 2005 11:17:59 -0600, Brad Balmer <bbalmer@peapod.com> wrote:
> I sent this to the wrong list at first by accident, so sorry about the
cross
> post:
> 
> I'm trying to convert a String into a Timestamp using:
> 
> ConvertUtils.register(new SqlTimestampConverter(), Timestamp.class);
> 
> try {
> 
>   timestamp = (Timestamp)ConvertUtils.convert(fullStringTimestamp,
> Timestamp.class);
> 
> }catch(Exception E) {
> 
>   E.printStackTrace();
> 
> }
> 
> The fullStringTimestamp value is 2005-02-03 03:30.000000000

You are missing the seconds field in the fullStringTimestamp
It should be in the format yyyy-mm-dd hh:mm:ss.fffffffff

> 
> Could anybody please point me in the right direction as this is throwing a
> org.apache.commons.beanutils.ConversionException.
> 
> Thanks.
> 
>

---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commons-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-user-help@jakarta.apache.org


Mime
View raw message