Package com.firebolt.jdbc.type.date
Class TimestampUtil
java.lang.Object
com.firebolt.jdbc.type.date.TimestampUtil
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic DateconvertToDate(long millis, TimeZone tz) Extracts the date part from a timestamp.static TimeParse a string and return a time representing its value.static TimestamptoTimestamp(String s, TimeZone tz) Parse a string and return a timestamp representing its value.
-
Constructor Details
-
TimestampUtil
public TimestampUtil()
-
-
Method Details
-
convertToDate
Extracts the date part from a timestamp.- Parameters:
millis- The timestamp from which to extract the date.tz- The time zone of the date.- Returns:
- The extracted date.
-
toTime
Parse a string and return a time representing its value.- Parameters:
s- The ISO formated time string to parse.tz- timezone- Returns:
- null if s is null or a time of the parsed string s.
- Throws:
SQLException- if there is a problem parsing s.
-
toTimestamp
Parse a string and return a timestamp representing its value.- Parameters:
s- The ISO formated date string to parse.tz- timezone- Returns:
- null if s is null or a timestamp of the parsed string s.
- Throws:
SQLException- if there is a problem parsing s.
-