public class TimestampUtils extends Object
| Constructor and Description |
|---|
TimestampUtils() |
| Modifier and Type | Method and Description |
|---|---|
Time |
convertToTime(Timestamp timestamp,
TimeZone tz)
Extracts the time part from a timestamp.
|
Date |
toDate(Calendar calParameter,
String s) |
String |
toString(Calendar calParameter,
Date x) |
String |
toString(Calendar calParameter,
Time x) |
String |
toString(Calendar calParameter,
Timestamp x) |
Time |
toTime(Calendar calParameter,
String s) |
Timestamp |
toTimestamp(Calendar calParameter,
String s)
Parse a string and return a timestamp representing its value.
|
String |
toTimestampString(Calendar cal,
Date x) |
String |
toTimestampString(Calendar cal,
Time x) |
public Timestamp toTimestamp(Calendar calParameter, String s) throws SQLException
s - The ISO formated date string to parse.SQLException - if there is a problem parsing s.public Time toTime(Calendar calParameter, String s) throws SQLException
SQLExceptionpublic Date toDate(Calendar calParameter, String s) throws SQLException
SQLExceptionCopyright © 2020. All rights reserved.