Performs a primitive conversion of <code>java.util.Date</code> to <code>java.sql.Timestamp</code>
based on the time value.

@param name name of field.
@param date date value.
@deprecated  use {@link #setTimestamp(String, Object)} instead.
4427
@Deprecated
    public void setTS(String name, java.util.Date date) {
        if(date == null) {
            set(name, null);
        } else {
            set(name, new java.sql.Timestamp(date.getTime()));
        }
    }
143032
public void setTimestamp(String fieldName, Timestamp value) {
		if (value == null) {
			throw new IllegalArgumentException("参数值[" + fieldName + "]不能为NULL.");
		}
		fieldList.add(fieldName);
		statementParameter.setTimestamp(value);
	}
79694
public void setDateAttribute(String name, Date value) {
		ensureAttributes();
		Attribute attribute = new DateAttribute(value);
		attribute.setEditable(isEditable(name));
		getAllAttributes().put(name, attribute);
	}
1335621
@Override
    public void setTimestamp(int parameterIndex, Timestamp x, Calendar cal) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        throw SQLError.noSupport();
    }
773532
@Override
    public void setTimestamp(String parameterName, Timestamp x) throws SQLException
    {
        checkClosed();
        throw SQLError.noSupport();
    }
750523
public void setDate(String fieldName, Date value) {
		if (value == null) {
			throw new IllegalArgumentException("参数值[" + fieldName + "]不能为NULL.");
		}
		fieldList.add(fieldName);
		statementParameter.setDate(value);
	}
825661
public void putDateField(HttpHeader name, long date) {
        String d = DateGenerator.formatDate(date);
        put(name, d);
    }
271290
@Override
	public void updateTimestamp(final int columnIndex, final Timestamp x) throws SQLException {
		wrapped.updateTimestamp(columnIndex, x);
	}
454056
public static java.sql.Timestamp convertSqlDate(Date dt) {
        if (dt == null) {
            return new java.sql.Timestamp(0);
        }
        return new java.sql.Timestamp(dt.getTime());
    }
197964
public static Timestamp convertDateToTimestamp(Date date, Timestamp elseValue) {
        return Checker.isNull(date) ? elseValue : new Timestamp(date.getTime());
    }
216499
@Override
    public void setTimestamp(int parameterIndex, Timestamp x) throws SQLException
    {
        checkParameterBounds(parameterIndex);
        this.parameters[parameterIndex-1] = x == null ? VoltType.NULL_TIMESTAMP : x;
    }
1050112
public void addDateField(String name, Date date)
    {
        if (_state!=__MSG_EDITABLE)
            return;
        _header.addDateField(name,date);
    }
58235
public void setDate(final Date date) {
		if (date == null) {
			setPartialDate(null, null, null);
		} else {
			Calendar cal = Calendar.getInstance();
			cal.setTime(date);
			Integer year = cal.get(Calendar.YEAR);
			Integer month = cal.get(Calendar.MONTH) + 1;
			Integer day = cal.get(Calendar.DAY_OF_MONTH);
			setPartialDate(day, month, year);
		}
	}
1204424
private void setDate(int i, LocalDate localDate) throws SQLException {
    int oid = Oid.DATE;
    bindString(i, connection.getTimestampUtils().toString(localDate), oid);
  }
367010
public static java.sql.Timestamp toTimestamp(String dateTime) {
		java.util.Date newDate = toDate(dateTime);

		if (newDate != null)
			return new java.sql.Timestamp(newDate.getTime());
		else
			return null;
	}
582944
public void setDate(Date date) {
		Date oldDate = calendar.getTime();
		calendar.setTime(date);
		int year = calendar.get(Calendar.YEAR);
		int month = calendar.get(Calendar.MONTH);
		int day = calendar.get(Calendar.DAY_OF_MONTH);

		yearChooser.setYear(year);
		monthChooser.setMonth(month);
		dayChooser.setCalendar(calendar);
		dayChooser.setDay(day);

		firePropertyChange("date", oldDate, date);
	}
620210
public static Timestamp parseTimestamp(final String date, final String format, final TimeZone timeZone) {
        if (N.isNullOrEmpty(date) || (date.length() == 4 && "null".equalsIgnoreCase(date))) {
            return null;
        }

        return createTimestamp(parse(date, format, timeZone));
    }