Documentation of 'org.apache.derby.client.am.DateTimeValue' Java class
DateTimeValue
org.apache.derby.client.am

Class DateTimeValue



  • public class DateTimeValue
    extends java.lang.Object
    This class represents a date or time value as it is represented in the database. In contrast to java.sql.Date, java.sql.Time and java.sql.Timestamp, which are based on java.util.Date, this class does not represent the time as an offset from midnight, January 1, 1970 GMT. Instead, it holds each component (year, month, day, hour, minute, second, nanosecond) as it would have been represented in a given calendar. Since it does not hold information about the time zone for the time it represents, it does not point to a well-defined point in time without being used together with a java.util.Calendar object.
    • Constructor Summary

      Constructors 
      Constructor and Description
      DateTimeValue(java.sql.Date date)
      Create an instance from a java.sql.Date using the default calendar.
      DateTimeValue(java.sql.Time time)
      Create an instance from a java.sql.Time using the default calendar.
      DateTimeValue(java.sql.Timestamp ts)
      Create an instance from a java.sql.Timestamp using the default calendar.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method and Description
      int getDayOfMonth()
      Get day of month component.
      int getHours()
      Get hour of day component (24 hour clock).
      int getMinutes()
      Get minute component.
      int getMonth()
      Get the month component.
      int getNanos()
      Get nanosecond component.
      int getSeconds()
      Get second component.
      int getYear()
      Get the year component.
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • DateTimeValue

        public DateTimeValue(java.sql.Date date)
        Create an instance from a java.sql.Date using the default calendar.
      • DateTimeValue

        public DateTimeValue(java.sql.Time time)
        Create an instance from a java.sql.Time using the default calendar.
      • DateTimeValue

        public DateTimeValue(java.sql.Timestamp ts)
        Create an instance from a java.sql.Timestamp using the default calendar.
    • Method Detail

      • getYear

        public int getYear()
        Get the year component.
      • getMonth

        public int getMonth()
        Get the month component. First month is 0 (Calendar.JANUARY).
      • getDayOfMonth

        public int getDayOfMonth()
        Get day of month component. First day of the month is 1.
      • getHours

        public int getHours()
        Get hour of day component (24 hour clock).
      • getMinutes

        public int getMinutes()
        Get minute component.
      • getSeconds

        public int getSeconds()
        Get second component.
      • getNanos

        public int getNanos()
        Get nanosecond component.

DataMelt 3.0 © DataMelt by jWork.ORG

You see the box below because you did not login.