Liquid XML Data Binder (C++, Java, VB6) / Reference / C++ / Reference / CDateTime / C++ SetDateTime
In This Topic
    C++ SetDateTime
    In This Topic
    void SetDateTime(const CDateTime& date,
                                     DTType type);
    void SetDateTime(short year,
                                     BYTE month,
                                     BYTE day,
                                     BYTE hour,
                                     BYTE minute,
                                     BYTE second);
    void SetDateTime(short year,
                                     BYTE month,
                                     BYTE day,
                                     BYTE hour,
                                     BYTE minute,
                                     BYTE second,
                                     WORD milli,
                                     WORD micro,
                                     WORD nano);
      Property Description  
        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 9)  
        Argument date The date to be copied into this class  
        Argument type The type of date that will be stored in this class. date must contain enough information to fully populate the type.  
        Description Populates this CDateTime as type dateTime.  
        Remarks This method is overloaded allowing different values to be set.
    Any values that are not provided are set to 0.
    NOTE: CDateTime uses the XML Schema formula for proleptic Gregorian calendar where year 0 is illegal and -4 (4BC) as a leap year.

    Throws: LtInvalidValueException thrown on parsing invalid values.
    Throws: LtInvalidStateException thrown if this DateTimes current type is not either zeroYear or dateTime.