The moose likes Other Open Source Projects and the fly likes Converting String to Timestamp Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Products » Other Open Source Projects
Reply Bookmark "Converting String to Timestamp" Watch "Converting String to Timestamp" New topic
Author

Converting String to Timestamp

brad balmer
Ranch Hand

Joined: Mar 08, 2004
Posts: 57
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

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

Thanks.
 
 
subject: Converting String to Timestamp
 
Threads others viewed
Calling Stored Procedure thru JPA
Convert a String to a Timestamp
time stamp question
Timestamp Binding
Extract Time
IntelliJ Java IDE