Package com.sun.star.util

Examples of com.sun.star.util.Date


        log.println("...done");

        log.println("Trying to add a date property");
        worked =
            addProperty(xPropContainer, "dateValue", com.sun.star.beans.PropertyAttribute.REMOVEABLE,
                new Date());
        assure("Couldn't set an date property", worked);
        log.println("...done");
       
        log.println("trying to remove a read only Property");
        try {
View Full Code Here


            tRes.tested("updateDate()", Status.skipped(true)) ;
            return ;
        }

        try {
            Date newVal = row.getDate(idx) ;
            newVal.Year ++ ;
            oObj.updateDate(idx, newVal) ;
            Date getVal = row.getDate(idx) ;
            result = ValueComparer.equalValue(newVal, getVal) ;
        } catch (SQLException e) {
            e.printStackTrace(log) ;
            result = false ;
        }
View Full Code Here

                if (value instanceof String ||
                    value instanceof Date) {
                    query += "'";
                }
                if (value instanceof Date) {
                    Date date = (Date)value;
                    query += date.Year + "-" + date.Month +
                        "-" + date.Day;
                } else if (value instanceof Boolean) {
                    query += (((Boolean)value).booleanValue())
                        ? "1" : "0";
View Full Code Here

        boolean result = true ;
        int col = findColumnOfType(Date.class) ;
        if (col < 0) log.println("Type not found in relation: not tested");
        else {
            try {
                Date getVal = oObj.getDate(col) ;
            } catch (SQLException e) {
                log.println("Unexpected SQL exception:") ;
                log.println(e) ;
                result = false ;
            }
View Full Code Here

        int idx = findParamOfType(Date.class) ;
        if (idx < 0) log.println("Type not found in relation: not tested");
        else {
            try {
                oObj.setDate(
                    idx, new Date ((short)19, (short)01, (short)1979)) ;
            } catch (SQLException e) {
                log.println("Unexpected SQL exception:") ;
                log.println(e) ;
                result = false ;
            }
View Full Code Here

        params.add(new Integer(12345)) ;
        params.add(new Long(23456)) ;
        params.add(new Float(1.234)) ;
        params.add(new Double(2.345)) ;
        params.add(new byte[] {1, 2, 3}) ;
        Date d = new Date();
        d.Day = 26; d.Month = 1; d.Year = 2001;
        params.add(d) ;
        Time t = new Time();
        t.Hours = 1; t.HundredthSeconds = 12; t.Minutes = 25; t.Seconds = 14;
        params.add(t) ;
View Full Code Here

        params.add(new Integer(12345)) ;
        params.add(new Long(23456)) ;
        params.add(new Float(1.234)) ;
        params.add(new Double(2.345)) ;
        params.add(new byte[] {1, 2, 3}) ;
        Date d = new Date();
        d.Day = 26; d.Month = 1; d.Year = 2001;
        params.add(d) ;
        Time t = new Time();
        t.Hours = 1; t.HundredthSeconds = 12; t.Minutes = 25; t.Seconds = 14;
        params.add(t) ;
View Full Code Here

        params.add(new Integer(12345)) ;
        params.add(new Long(23456)) ;
        params.add(new Float(1.234)) ;
        params.add(new Double(2.345)) ;
        params.add(new byte[] {1, 2, 3}) ;
        Date d = new Date();
        d.Day = 26; d.Month = 1; d.Year = 2001;
        params.add(d) ;
        Time t = new Time();
        t.Hours = 1; t.HundredthSeconds = 12; t.Minutes = 25; t.Seconds = 14;
        params.add(t) ;
View Full Code Here

                if (value instanceof String ||
                    value instanceof Date) {
                    query += "'";
                }
                if (value instanceof Date) {
                    Date date = (Date)value;
                    query += date.Year + "-" + date.Month +
                        "-" + date.Day;
                } else if (value instanceof Boolean) {
                    query += (((Boolean)value).booleanValue())
                        ? "1" : "0";
View Full Code Here

    XResultSet rs  = stmt.executeQuery("SELECT FIRSTNAME, LASTNAME, BIRTHDATE FROM SALESMAN");
    XRow row = (XRow)UnoRuntime.queryInterface(XRow.class,rs);
    while ( rs != null && rs.next() ) {
      String fn = row.getString( 1 );
      String ln = row.getString( 2 );
      Date   dt = row.getDate( 3 );
      System.out.println(fn + "    " + ln + "    " + dt.Month + "/" + dt.Day + "/" + dt.Year);
    }
  }
View Full Code Here

TOP

Related Classes of com.sun.star.util.Date

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.