Java SQL Date Add addDays(Date date, int days)

Here you can find the source of addDays(Date date, int days)

Description

add Days

License

Open Source License

Declaration

public static Date addDays(Date date, int days) 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.sql.Date;

public class Main {
    public static Date addDays(Date date, int days) {
        // TODO: Don't bother with a proper correction here, since it'll all be
        // taken care of in the SQL
        return new Date(date.getTime() + 1000 * 60 * 60 * 24 * days);
    }//w ww  .  jav a  2 s . c o  m
}

Related

  1. add(Date date, int unit, int amount)
  2. addDate(int add, java.util.Date d)
  3. addDate(java.util.Date date, int day)
  4. addDate(String date)
  5. addDaysToSQLDate(java.sql.Date date, int days)
  6. addMesData(Date dtReferencia, int mes)
  7. addMilliseconds(Date date, int milliseconds)
  8. AddSqlDate(String strDate, int iDays)