Liquid XML Data Binder 2021
Liquid XML Data Binder (C++, Java, VB6) / Reference / Java / Reference / com.liquid_technologies.ltxmllib19 / DateTime / Java Class Constructor DateTime
In This Topic
    Java Class Constructor DateTime
    In This Topic
    public DateTime()

    public DateTime(DateTimeType type)

    public DateTime(DateTimeType type,
                                 String dateTime)
        throws LtInvalidValueException

    public DateTime(short year,
                                 byte month,
                                 byte day)
        throws LtInvalidValueException

    public DateTime( short year,
                                   byte month,
                                   byte day,
                                   byte hour,
                                   byte minute,
                                   byte second)
        throws LtInvalidValueException

    public DateTime( short year,
                                   byte month,
                                   byte day,
                                   byte hour,
                                   byte minute,
                                   byte second,
                                   short milli,
                                   short micro,
                                   short nano)
        throws LtInvalidValueException

    public DateTime(GregorianCalendar calendar,
                                  boolean useTimeZone)
        throws LtInvalidValueException


      Property Description  
        Argument type DTType the type of this DateTime  
        Argument newTime time_t the object to populate from  
        Argument systime SYSTEMTIME the object to populate from  
        Argument filetime FILETIME the object to populate from  
        Argument year sets the Year part of the date. (Valid Range -9999 to 9999)  
        Argument month sets the Month part of the date. Jan = 1, Feb = 2 etc. (Valid Range = 1 to 12)  
        Argument day sets the Day part of the date. (Valid Range = 1 to days in month)  
        Argument hour sets the Hours part of the date. (Valid Range = 0 to 23)  
        Argument minute sets the Minutes part of the date. (Valid Range = 0 to 59)  
        Argument second sets the Seconds part of the date. (Valid Range = 0 to 59)  
        Argument milli sets the Milli-Seocnds part of the date. (Valid Range = 0 to 999)  
        Argument micro sets the Micro-Seocnds part of the date. (Valid Range = 0 to 999)  
        Argument nano sets the Nano-Seocnds part of the date. (Valid Range = 0 to 999)  
        Description Constructs a DateTime.  
        Remarks DateTime();
    The internal data is invalid until a set method is called.

    DateTime(DTType type);
    The internal data is invalid until a set method is called.
    NOTE: Only methods that keep this type may be used to set the data.

    DateTime(short year, BYTE month, BYTE day);
    Constructs a DateTime, of type xs:date. This constructor is overloaded allowing different values to be set.
    The internal data is set invalid on parsing invalid values.
    NOTE: DateTime uses the XML Schema formula for proleptic Gregorian calendar where year 0 is illegal and -4 (4BC) as a leap year.

    DateTime(short year, BYTE month, BYTE day, BYTE hour, BYTE minute, BYTE second);
    Constructs a DateTime, of type xs:dateTime. This constructor is overloaded allowing different values to be set.
    The internal data is set invalid on parsing invalid values.
    NOTE: DateTime uses the XML Schema formula for proleptic Gregorian calendar where year 0 is illegal and -4 (4BC) as a leap year.

    DateTime(short year, BYTE month, BYTE day, BYTE hour, BYTE minute, BYTE second, WORD milli, WORD micro, WORD nano);
    Constructs a DateTime, of type xs:dateTime. This constructor is overloaded allowing different values to be set.
    The internal data is set invalid on parsing invalid values.
    NOTE: DateTime uses the XML Schema formula for proleptic Gregorian calendar where year 0 is illegal and -4 (4BC) as a leap year. Param: year sets the Year part of the date. (Valid Range -9999 to 9999)

    public DateTime(GregorianCalendar calendar, boolean useTimeZone)
    Constructs a DateTime from a GregorianCalendar object. If the GregorianCalendar is 1BC, then the
    year stored is -1.
    calendar the object to populate from
    useTimeZone true if the Calendars TimeZone should be used
    LtInvalidValueException thrown on parsing invalid values.