java.lang.Object
org.hsqldb.lib.HsqlDateTime
- public class HsqlDateTime
- extends java.lang.Object
collection of static methods to convert Date, Time and Timestamp strings
into corresponding Java objects. Also accepts SQL literals such as NOW,
TODAY as valid strings and returns the current date / time / datetime.
Compatible with jdk 1.1.x
- Version:
- 1.7.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
sdftPattern
private static final java.lang.String sdftPattern
- See Also:
- Constant Field Values
sdfdPattern
private static final java.lang.String sdfdPattern
- See Also:
- Constant Field Values
sdftsPattern
private static final java.lang.String sdftsPattern
- See Also:
- Constant Field Values
sdfts
private static java.text.SimpleDateFormat sdfts
HsqlDateTime
public HsqlDateTime()
timestampValue
public static java.sql.Timestamp timestampValue(java.lang.String s)
- Converts a string in JDBC timestamp escape format to a
Timestamp value.
timestampValue
public static java.sql.Timestamp timestampValue(long time,
int nano)
dateValue
public static java.sql.Date dateValue(java.lang.String s)
- Converts a string in JDBC date escape format to a
Date
value. Also accepts Timestamp values.
timeValue
public static java.sql.Time timeValue(java.lang.String s)
- Converts a string in JDBC date escape format to a
Time value.
getDate
public static java.sql.Date getDate(java.lang.String dateString,
java.util.Calendar cal)
throws java.sql.SQLException
getTime
public static java.sql.Time getTime(java.lang.String timeString,
java.util.Calendar cal)
throws java.sql.SQLException
getTimestamp
public static java.sql.Timestamp getTimestamp(java.lang.String dateString,
java.util.Calendar cal)
throws java.sql.SQLException
getTimestampString
public static java.lang.String getTimestampString(java.sql.Timestamp x,
java.util.Calendar cal)
throws java.sql.SQLException
getTimeString
public static java.lang.String getTimeString(java.sql.Time x,
java.util.Calendar cal)
throws java.sql.SQLException
getDateString
public static java.lang.String getDateString(java.sql.Date x,
java.util.Calendar cal)
throws java.sql.SQLException
invalidValue
private static java.sql.SQLException invalidValue()