Package oracle.sql
Class DATE
java.lang.Object
oracle.sql.Datum
oracle.sql.DATE
- All Implemented Interfaces:
Serializable,oracle.jdbc.internal.OracleDate
DATE Class
The DATE class provides conversions between the Oracle Date
(ldx_t) data type and Java classes java.sql.Date,
java.sql.Time, java.sql.Timestamp
The internal data for this object is stored as a seven byte array in the super class' storage area. The bytes are arranged as follows:
Byte Represents
0 Century (19 for 1990)
1 Decade (90 for 1990)
2 Month
3 Day
4 Hour
5 Minute
6 Seconds
Static methods are used for conversions.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intBad day: above rangestatic final intBad day: below rangestatic final intBad date formatstatic final intBad hour: above rangestatic final intBad hour: below rangestatic final intBad minute: above rangestatic final intBad minute: below rangestatic final intBad month: above rangestatic final intBad month: below rangestatic final intBad second: above rangestatic final intBad second: below rangestatic final intBad year: above rangestatic final intBad year: below rangestatic final intZero valued hourstatic final intZero valued minutestatic final intDay is one of those "missing" from the year 1582static final intZero valued secondstatic final intYear zero does not existFields inherited from class oracle.sql.Datum
ojiOracleDatumWithConnection, targetDatum -
Constructor Summary
ConstructorsConstructorDescriptionDATE()Constructs a DATE object initialized to 1/1/1970.DATE(byte[] date) Create a DATE object represented by the given Oracle Date.Constructs a DATE object initialized to the value specified by the objectConstructs a DATE object initialized to the value specified by the object and a CalendarCreate a DATE object given a Java String object.Create a DATE object given a Java String object.Create a DATE object given a Java String object and a CalendarCreate a DATE object given a Java Date object.Create a DATE object given a Java Date object and a CalendarCreate a DATE object given a Java Time object.Create a DATE object given a Java Time object and a CalendarCreate a DATE object given a Java Timestamp objectCreate a DATE object given a Java Timestamp object and a CalendarCreate a DATE object given a Java LocalDate objectDATE(LocalDateTime ldt) Create a DATE object given a Java LocalDateTime objectCreate a DATE object given a Java LocalTime objectDATE(OffsetDateTime odt) Create a DATE object given a Java OffsetDateTime objectDATE(OffsetTime ot) Create a DATE object given a Java OffsetTime objectDATE(ZonedDateTime zdt) Create a DATE object given a Java ZonedDateTime object -
Method Summary
Modifier and TypeMethodDescriptionaddJulianDays(int julianDay, int julianSec) Add Julian days to a date.addMonths(int months) Add months to a date.static intcheckValidity(byte[] date) Checks the DATE passed in.intReturns -1 if DATE is less than date, 0 if DATE and date are equal (==), 1 if DATE is greater than date.Calls toDate to convert internal Oracle DATE to a Java Date.Calls toDate to convert internal Oracle DATE and Calendar to a Java Date.voiddiffInJulianDays(DATE date, int[] julianDay, int[] julianSec) Calculates the difference between two dates in Julian days.diffInMonths(DATE date) Calculates the difference between two dates in months.static DATEfromJulianDays(int julianDay, int julianSec) Convert given julian days and seconds to an Oracle Date.static DATEConvert a string to a DATE object.static DATEGets current date and timebooleanisConvertibleTo(Class<?> cls) Determines if the object can be converted to a particular classreturns a DATE object intialized to the last day of the month .Converts DATE to LocalDateTime.Converts DATE to LocalDate.Converts DATE to LocalTime.makeJdbcArray(int arraySize) Returns a JDBC array representation of the datumstatic voidnumberToJulianDays(NUMBER num, int[] julianDay, int[] julianSec) Converts an Oracle NUMBER to Julian days and secondsstatic DATECreates DATE from the LocalDate.static DATEof(LocalDateTime ldt) Creates DATE from the LocalDateTime.static DATECreates DATE from the LocalTime.static DATEof(OffsetDateTime odt) Creates DATE from the OffsetDateTime.static DATEof(OffsetTime ot) Creates DATE from the OffsetTime.static DATEof(ZonedDateTime zdt) Creates DATE from the ZonedDateTime.static byte[]parseFormat(String fmt, String lang) Converts the fmt string into tokens for use by toText().returns a DATE object with date rounded to specified precisionsetDayOfWeek(int day) returns a DATE object initialized to date advanced to the week of the day specified.Calls toString to convert internal Oracle DATE to a Java String.Calls toTimestamp to convert internal Oracle DATE to a Java Timestamp.timestampValue(Calendar cal) Calls toTimestamp to convert internal Oracle DATE and Calendar to a Java Timestamp.Calls toTime to convert internal Oracle DATE to a Java Time.Calls toTime to convert internal Oracle DATE and Calendar to a Java Time.byte[]toBytes()static byte[]Convert Java String to Oracle DATE.static byte[]Convert Java String to Oracle DATE.static byte[]Convert Java Date to Oracle DATE.static byte[]Convert Java Date and Calendar to Oracle DATE.static byte[]Convert Java Time to Oracle DATE.static byte[]Convert Java Time and Calendar to Oracle DATE.static byte[]Convert Java Timestamp to Oracle DATE.static byte[]Convert Java Timestamp and Calendar to Oracle DATE.static byte[]Convert Java LocalDate to Oracle DATEstatic byte[]toBytes(LocalDateTime ldt) Convert Java LocalDateTime to Oracle DATEstatic byte[]Convert Java LocalTime to Oracle DATEstatic byte[]toBytes(OffsetDateTime odt) Convert Java OffsetDateTime to Oracle DATEstatic byte[]toBytes(OffsetTime ot) Convert Java OffsetTime to Oracle DATEstatic byte[]toBytes(ZonedDateTime zdt) Convert Java ZonedDateTime to Oracle DATEstatic DatetoDate(byte[] date) Convert Oracle DATE to Java Date.static DateConvert Oracle DATE and Calendar to Java Date.toJdbc()Returns the JDBC representation of the datum objectvoidtoJulianDays(int[] julianDay, int[] julianSec) Convert to Julian days and seconds from the given date.Converts DATE to LocalDate.static LocalDatetoLocalDate(byte[] date) Convert a byte array representing a DATE object to a Java LocalDateConverts DATE to LocalDateTime.static LocalDateTimetoLocalDateTime(byte[] date) Convert a byte array representing a DATE object to a Java LocalDateTimeConverts DATE to LocalTime.static LocalTimetoLocalTime(byte[] date) Convert a byte array representing a DATE object to a Java LocalTimetoNumber()Converts date to an Oracle Number.toString()static StringtoString(byte[] bytes) Converts a DATE to a stringConvert date to text as specified by fmt.Convert date to text as specified by fmt.static TimetoTime(byte[] date) Convert Oracle DATE to Java Time.static TimeConvert Oracle DATE and Calendar to Java Time.static TimestamptoTimestamp(byte[] date) Convert Oracle DATE to Java Timestamp.static TimestamptoTimestamp(byte[] date, Calendar cal) Convert Oracle DATE and Calendar to Java Timestamp.returns a DATE object with date truncated to specified precisionzeroTime()Zero out the time from a DATE object.Methods inherited from class oracle.sql.Datum
asciiStreamValue, bigDecimalValue, binaryStreamValue, booleanValue, bytesEqual, bytesHashCode, byteValue, characterStreamValue, compareBytes, doubleValue, equals, floatValue, getBytes, getConnectionDuringExceptionHandling, getLength, getStream, intValue, isNull, longValue, setBytes, setShareBytes, shareBytes, stringValue, toClass
-
Field Details
-
BDA
public static final int BDABad day: above range- See Also:
-
BDAL
public static final int BDALBad day: below range- See Also:
-
BMO
public static final int BMOBad month: above range- See Also:
-
BMOL
public static final int BMOLBad month: below range- See Also:
-
BYR
public static final int BYRBad year: above range- See Also:
-
BYRL
public static final int BYRLBad year: below range- See Also:
-
BHR
public static final int BHRBad hour: above range- See Also:
-
BHRL
public static final int BHRLBad hour: below range- See Also:
-
BMN
public static final int BMNBad minute: above range- See Also:
-
BMNL
public static final int BMNLBad minute: below range- See Also:
-
BSC
public static final int BSCBad second: above range- See Also:
-
BSCL
public static final int BSCLBad second: below range- See Also:
-
MSD
public static final int MSDDay is one of those "missing" from the year 1582- See Also:
-
YR0
public static final int YR0Year zero does not exist- See Also:
-
BDT
public static final int BDTBad date format- See Also:
-
HRZER0
public static final int HRZER0Zero valued hour- See Also:
-
MIZERO
public static final int MIZEROZero valued minute- See Also:
-
SEZERO
public static final int SEZEROZero valued second- See Also:
-
-
Constructor Details
-
DATE
public DATE()Constructs a DATE object initialized to 1/1/1970. -
DATE
public DATE(byte[] date) Create a DATE object represented by the given Oracle Date.- Parameters:
date- Oracle DATE
-
DATE
Create a DATE object given a Java Date object.- Parameters:
date- Java Date object
-
DATE
Create a DATE object given a Java Time object.- Parameters:
time- Java Time object
-
DATE
Create a DATE object given a Java Timestamp object- Parameters:
timestamp- Java Timestamp object
-
DATE
Create a DATE object given a Java Date object and a Calendar- Parameters:
date- Java Date objectcal- Java Calendar object which encapsulates the timezone information of date
-
DATE
Create a DATE object given a Java Time object and a Calendar- Parameters:
time- Java Time objectcal- Java Calendar object which encapsulates the timezone information of time
-
DATE
Create a DATE object given a Java Timestamp object and a Calendar- Parameters:
timestamp- Java Timestamp objectcal- Java Calendar object which encapsulates the timezone information of timestamp
-
DATE
Create a DATE object given a Java String object.- Parameters:
str- Java String object
-
DATE
Create a DATE object given a Java String object.- Parameters:
str- Java String objectlenient- Java Boolean variable- Throws:
ParseException
-
DATE
Create a DATE object given a Java String object and a Calendar- Parameters:
str- Java String objectcal- Java Calendar object which encapsulates the timezone information for interpreting str
-
DATE
Constructs a DATE object initialized to the value specified by the object- Parameters:
obj- Object valueobj- Object valueobj- Object value- Throws:
SQLException- if initialization is not allowed
-
DATE
Constructs a DATE object initialized to the value specified by the object and a Calendar- Parameters:
obj- Object valuecal- Calendar to useobj- Object valueobj- Object valuecal- Calendar which encapsulates the timezone information of obj- Throws:
SQLException- if initialization is not allowed
-
DATE
Create a DATE object given a Java LocalDate object- Parameters:
ld- Java LocalDate object- Throws:
SQLException
-
DATE
Create a DATE object given a Java LocalDateTime object- Parameters:
ldt- Java LocalDateTime object- Throws:
SQLException
-
DATE
Create a DATE object given a Java LocalTime object- Parameters:
lt- Java LocalTime object- Throws:
SQLException
-
DATE
Create a DATE object given a Java OffsetDateTime object- Parameters:
odt- Java OffsetDateTime object- Throws:
SQLException
-
DATE
Create a DATE object given a Java OffsetTime object- Parameters:
ot- Java OffsetDateTime object- Throws:
SQLException
-
DATE
Create a DATE object given a Java ZonedDateTime object- Parameters:
zdt- Java ZonedDateTime object- Throws:
SQLException
-
-
Method Details
-
toDate
Convert Oracle DATE to Java Date.- Parameters:
date- Oracle DATE to be converted- Returns:
- the java.sql.Date object represented by the Oracle DATE date.
-
toTime
Convert Oracle DATE to Java Time.- Parameters:
date- Oracle DATE to be converted- Returns:
- the java.sql.Time object represented by the Oracle DATE date.
-
toTimestamp
Convert Oracle DATE to Java Timestamp.- Parameters:
date- Oracle DATE to be converted- Returns:
- the java.sql.Timestamp object represented by the Oracle DATE date.
-
toDate
Convert Oracle DATE and Calendar to Java Date.- Parameters:
date- Oracle DATE to be convertedcal- Calendar which encapsulates the timezone information to be used to create Date object- Returns:
- the java.sql.Date object represented by the Oracle DATE date.
-
toTime
Convert Oracle DATE and Calendar to Java Time.- Parameters:
date- Oracle DATE to be convertedcal- Calendar which encapsulates the timezone information to be used to create the Time object- Returns:
- the java.sql.Time object represented by the Oracle DATE date.
-
toTimestamp
Convert Oracle DATE and Calendar to Java Timestamp.- Parameters:
date- Oracle DATE to be convertedcal- Calendar which encapsulates the timezone information to be used to create the Timestamp object- Returns:
- the java.sql.Timestamp object represented by the Oracle DATE date.
-
toString
Converts a DATE to a string- Parameters:
date- a byte array- Returns:
- String representing the date
-
toBytes
public byte[] toBytes()- Specified by:
toBytesin interfaceoracle.jdbc.internal.OracleDate
-
toBytes
Convert Java Date to Oracle DATE.- Parameters:
date- java.sql.Date object to be converted.- Returns:
- the byte array representing the input date.
-
toBytes
Convert Java Time to Oracle DATE.- Parameters:
time- java.sql.Time object to be converted.- Returns:
- the byte array representing the input time.
-
toBytes
Convert Java Timestamp to Oracle DATE.- Parameters:
timestamp- java.sql.Timestamp object to be converted.- Returns:
- the byte array representing the input timestamp.
-
toBytes
Convert Java Date and Calendar to Oracle DATE.- Parameters:
date- java.sql.Date object to be converted.cal- java.util.Calendar object which encapsulates the timezone information of date- Returns:
- the byte array representing the input date.
-
toBytes
Convert Java Time and Calendar to Oracle DATE.- Parameters:
time- java.sql.Time object to be converted.cal- java.util.Calendar object which encapsulates the timezone information of time- Returns:
- the byte array representing the input time.
-
toBytes
Convert Java Timestamp and Calendar to Oracle DATE.- Parameters:
timestamp- java.sql.Timestamp object to be converted.cal- java.util.Calendar object which encapsulates the timezone information of date- Returns:
- the byte array representing the input timestamp.
-
toBytes
Convert Java String to Oracle DATE.- Parameters:
str- java.lang.String object to be converted.- Returns:
- the byte array representing the input string.
-
toBytes
Convert Java String to Oracle DATE.- Parameters:
str- java.lang.String object to be converted.cal- java.util.Calendar object which encapsulates the timezone information for interpreting str- Returns:
- the byte array representing the input string.
-
dateValue
Calls toDate to convert internal Oracle DATE to a Java Date. -
timeValue
Calls toTime to convert internal Oracle DATE to a Java Time. -
timestampValue
Calls toTimestamp to convert internal Oracle DATE to a Java Timestamp.- Overrides:
timestampValuein classDatum- Returns:
- a Java Timestamp value
-
dateValue
Calls toDate to convert internal Oracle DATE and Calendar to a Java Date.- Parameters:
cal- Calendar to use- Returns:
- a Java Date value
-
timeValue
Calls toTime to convert internal Oracle DATE and Calendar to a Java Time. -
timestampValue
Calls toTimestamp to convert internal Oracle DATE and Calendar to a Java Timestamp.- Overrides:
timestampValuein classDatum- Parameters:
cal- Calendar to use- Returns:
- a Java Timestamp value
-
stringValue
Calls toString to convert internal Oracle DATE to a Java String.- Overrides:
stringValuein classDatum- Returns:
- a Java String value
-
toString
-
toJdbc
Returns the JDBC representation of the datum object -
makeJdbcArray
Returns a JDBC array representation of the datum- Specified by:
makeJdbcArrayin classDatum- Parameters:
arraySize- size of the array- Returns:
- an object containing the JDBC array value
-
isConvertibleTo
Determines if the object can be converted to a particular class- Specified by:
isConvertibleToin classDatum- Parameters:
cls- Class to convert to- Returns:
- true, if conversion to cls is permitted false, if conversion to cls is not permitted
-
addJulianDays
Add Julian days to a date.- Parameters:
julianDay- Number of Julian days to add to DATEjulianSec- Number of seconds past midnight- Returns:
- new DATE object initalized to the DATE values added to the Julian days.
- Throws:
SQLException- if Java implementation is not available
-
addMonths
Add months to a date.- Parameters:
months- integral months to add to date- Returns:
- new DATE object initialized to the DATE value added to months. months can be negative to perform month subtraction.
- Throws:
SQLException- if Java implementation is not available
-
zeroTime
Zero out the time from a DATE object.- Throws:
SQLException
-
diffInJulianDays
Calculates the difference between two dates in Julian days.- Parameters:
date- Date to be subtracted.julianDay- Number of Julian daysjulianSec- Number of seconds past midnight- Throws:
SQLException- if Java implementation is not available
-
diffInMonths
Calculates the difference between two dates in months.- Parameters:
date- Date to be subtracted.- Returns:
- NUMBER difference in months as an Oracle Number.
- Throws:
SQLException- if Java implementation is not available
-
getCurrentDate
Gets current date and time- Returns:
- DATE object
- Throws:
SQLException- if Java implementation is not available
-
checkValidity
Checks the DATE passed in.- Parameters:
date- Date to be checked- Returns:
- 0 if the date is valid or the ORed representations in
the following table:
BDA Bad day: above range BDAL Bad day: below range BMO Bad month: above range BMOL Bad month: below range BYR Bad year: above range BYRL Bad year: below range BHR Bad hour: above range BHRL Bad hour: below range BMN Bad minute: above range BMNL Bad minute: below range BSC Bad second: above range BSCL Bad second: below range MSD Day is one of those "missing" from the year 1582 YR0 Year zero does not exist BDT Bad date format HRZERO Zero valued hour MIZERO Zero valued minute SEZERO Zero valued second - Throws:
SQLException- if Java implementation is not available
-
fromJulianDays
Convert given julian days and seconds to an Oracle Date.- Parameters:
julianDay- Number of Julian daysjulianSec- Number of seconds past midnight- Returns:
- new DATE object initialized based on the number of Julian days.
- Throws:
SQLException- if Java implementation is not available
-
fromText
Convert a string to a DATE object.- Parameters:
datestr- Input Date stringfmt- Date Formatlang- Input date language- Returns:
- DATE object
Note: Some of the extended Date Formats supported by the
C Date libraries from CORE are not supported in this pure Java equivalent
implementation. The Format strings supported are:
String Meaning a.d. B.C./A.D. indicator a.m. A.M./P.M. indicator ad BC/AD indicator am AM/PM indicator b.c. B.C./A.D. indicator bc BC/AD indicator d day of the week day name of the day, spelled out dd day of the month ddd day of year dy name of weekday abbreviated hh hour representation in 12 hour format hh24 hour representation in 24 hour format mi minutes mm two digit month representation mon month abbreviation month name of the month, spelled out p.m. A.M./P.M. indicator pm AM/PM indicator ss two digit second representation Y last digit of the year YY last two digits of a year YYY last three digits of a year YYYY year " " all text in quotes is copied into the output string It is not possible to place a quote character into the output string. On input, literal text is a placeholder for another string of the same length /,%&@#.. punctuation (non-alphanumeric characters) is treated exactly like a literal without the need for quotes. The Date format string not supported versus the C library are:
String Meaning E abbreviated era name EE full era name FX all date literals must be an exact match j Julian day RM Roman numeral month (I-XII) RR Round year with two digits (on input, rounds the century up one if the year is <50 and the reference date is >= 50, and down one century if the year is >= 50 and the reference date is <50) RRRR Round year (on input, accepts either four digit input or, for two digit input, rounds the century up one if the year is <50 and the reference date is >= 50, and down one century if the year is >= 50 and the reference date is <50) sssss number of seconds past midnight sy,yyy signed year (BC dates have "-" in front) syYYY signed year (BC dates have "-" in front) Y,YYY year with comma YEAR year number spelled out Also parsing is strict i.e. spaces and literals should match the format string exactly. (except for a.d./b.c. the string should be ad/bc)
- Throws:
SQLException
-
lastDayOfMonth
returns a DATE object intialized to the last day of the month .- Returns:
- a DATE object
- Throws:
SQLException- if Java implementation is not available
-
numberToJulianDays
public static void numberToJulianDays(NUMBER num, int[] julianDay, int[] julianSec) throws SQLException Converts an Oracle NUMBER to Julian days and seconds- Parameters:
num- Oracle Number to convertjulianDay- Number of Julian daysjulianSec- Number of seconds past midnight- Throws:
SQLException- if Java implementation is not available
-
round
returns a DATE object with date rounded to specified precision- Parameters:
prec- precision to use while rounding- Returns:
- DATE object
- Throws:
SQLException- if Java implementation is not available
-
setDayOfWeek
returns a DATE object initialized to date advanced to the week of the day specified.- Parameters:
day- day of the week the date needs to be advanced- Returns:
- DATE object.
- Throws:
SQLException- if Java implementation is not available
-
toJulianDays
Convert to Julian days and seconds from the given date.- Parameters:
julianDay- Number of Julian daysjulianSec- Number of seconds past midnight- Throws:
SQLException- if Java implementation is not available
-
toNumber
Converts date to an Oracle Number.- Returns:
- an Oracle Number
- Throws:
SQLException- if Java implementation is not available
-
toText
Convert date to text as specified by fmt.- Parameters:
fmt- date formatlang- the NLS language the conversion is to be performed in, null indicates use default.- Returns:
- a String converted from date via format fmt.
- Throws:
SQLException- if Java implementation is not available or an invalid format string is provided.
-
toText
Convert date to text as specified by fmt.- Parameters:
pfmt- date format parsed by parseFormatlang- the NLS language the conversion is to be performed in, null indicates use default.- Returns:
- a String converted from date via format fmt.
- Throws:
SQLException- if Java implementation is not available or an invalid format string is provided.
-
parseFormat
Converts the fmt string into tokens for use by toText().- Parameters:
fmt- date formatlang- A String containing NLS Language and/or Territory null indicates to use default.- Returns:
- a byte array containing tokens from the parsed format
- Throws:
SQLException- if the format string can not be parsed.
-
truncate
returns a DATE object with date truncated to specified precision- Parameters:
prec- precision to use while truncating- Returns:
- DATE object
- Throws:
SQLException- if Java implementation is not available
-
compareTo
Returns -1 if DATE is less than date, 0 if DATE and date are equal (==), 1 if DATE is greater than date.- Parameters:
date- input Oracle Date- Returns:
- integer result of comparison
-
of
Creates DATE from the LocalDate.- Parameters:
ld- LocalDate object- Returns:
- DATE object
- Throws:
SQLException
-
toLocalDate
Converts DATE to LocalDate.- Returns:
- LocalDate object.
- Throws:
SQLException
-
localDateValue
Converts DATE to LocalDate.- Returns:
- LocalDate object.
- Throws:
SQLException
-
of
Creates DATE from the LocalDateTime.- Parameters:
ldt- LocalDateTime object- Returns:
- DATE object
- Throws:
SQLException
-
toLocalDateTime
Converts DATE to LocalDateTime.- Returns:
- LocalDateTime object.
- Throws:
SQLException
-
localDateTimeValue
Converts DATE to LocalDateTime.- Returns:
- LocalDateTime object.
- Throws:
SQLException
-
of
Creates DATE from the LocalTime.- Parameters:
lt- LocalTime object- Returns:
- DATE object
- Throws:
SQLException
-
toLocalTime
Converts DATE to LocalTime.- Returns:
- LocalTime object.
- Throws:
SQLException
-
localTimeValue
Converts DATE to LocalTime.- Returns:
- LocalTime object.
- Throws:
SQLException
-
of
Creates DATE from the OffsetDateTime.- Parameters:
odt- OffsetDateTime object- Returns:
- DATE object
- Throws:
SQLException
-
of
Creates DATE from the OffsetTime.- Parameters:
ot- OffsetTime object- Returns:
- DATE object
- Throws:
SQLException
-
of
Creates DATE from the ZonedDateTime.- Parameters:
zdt- ZonedDateTime object- Returns:
- DATE object
- Throws:
SQLException
-
toLocalDate
Convert a byte array representing a DATE object to a Java LocalDate- Parameters:
date- Oracle DATE object to be converted- Returns:
- the java.time.LocalDate object represented by the Oracle DATE object.
- Throws:
SQLException
-
toLocalTime
Convert a byte array representing a DATE object to a Java LocalTime- Parameters:
date- Oracle DATE object to be converted- Returns:
- the java.time.LocalTime object represented by the Oracle DATE object.
- Throws:
SQLException
-
toLocalDateTime
Convert a byte array representing a DATE object to a Java LocalDateTime- Parameters:
date- Oracle DATE object to be converted- Returns:
- the java.time.LocalDateTime object represented by the Oracle DATE object.
- Throws:
SQLException
-
toBytes
Convert Java LocalDate to Oracle DATE- Parameters:
ld- LocalDate object- Returns:
- the byte array representing the java LocalDate.
-
toBytes
Convert Java LocalDateTime to Oracle DATE- Parameters:
ldt- LocalDateTime object- Returns:
- the byte array representing the java LocalDateTime.
-
toBytes
Convert Java LocalTime to Oracle DATE- Parameters:
lt- LocalTime object- Returns:
- the byte array representing the java LocalTime.
-
toBytes
Convert Java OffsetDateTime to Oracle DATE- Parameters:
odt- OffsetDateTime object- Returns:
- the byte array representing the java OffsetDateTime.
-
toBytes
Convert Java OffsetTime to Oracle DATE- Parameters:
ot- OffsetTime object- Returns:
- the byte array representing the java OffsetTime.
-
toBytes
Convert Java ZonedDateTime to Oracle DATE- Parameters:
zdt- ZonedDateTime object- Returns:
- the byte array representing the java ZonedDateTime.
-