org.postgresql.jdbc2
Class TimestampUtils
java.lang.Object
org.postgresql.jdbc2.TimestampUtils
public class TimestampUtils
- extends java.lang.Object
Misc utils for handling time and date values.
|
Method Summary |
java.sql.Date |
toDate(java.util.Calendar cal,
java.lang.String s)
|
java.lang.String |
toString(java.util.Calendar cal,
java.sql.Date x)
|
java.lang.String |
toString(java.util.Calendar cal,
java.sql.Time x)
|
java.lang.String |
toString(java.util.Calendar cal,
java.sql.Timestamp x)
|
java.sql.Time |
toTime(java.util.Calendar cal,
java.lang.String s)
|
java.sql.Timestamp |
toTimestamp(java.util.Calendar cal,
java.lang.String s)
Parse a string and return a timestamp representing its value. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
toTimestamp
public java.sql.Timestamp toTimestamp(java.util.Calendar cal,
java.lang.String s)
throws java.sql.SQLException
- Parse a string and return a timestamp representing its value.
- Parameters:
s - The ISO formated date string to parse.
- Returns:
- null if s is null or a timestamp of the parsed string s.
- Throws:
java.sql.SQLException - if there is a problem parsing s.
toTime
public java.sql.Time toTime(java.util.Calendar cal,
java.lang.String s)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
toDate
public java.sql.Date toDate(java.util.Calendar cal,
java.lang.String s)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
toString
public java.lang.String toString(java.util.Calendar cal,
java.sql.Timestamp x)
toString
public java.lang.String toString(java.util.Calendar cal,
java.sql.Date x)
toString
public java.lang.String toString(java.util.Calendar cal,
java.sql.Time x)