Java SQL Date Create getDateAfter(Date date, long offset)

Here you can find the source of getDateAfter(Date date, long offset)

Description

get Date After

License

Open Source License

Declaration

public static Date getDateAfter(Date date, long offset) 

Method Source Code


//package com.java2s;

import java.util.*;

public class Main {
    public static Date getDateAfter(Date date, long offset) {
        long offsettime = 1000 * 60 * 60 * 24 * offset;
        long t = date.getTime() + offsettime;
        return new Date(t);
    }//from   ww  w  . j a v a2 s  .co  m

    public String getTime() {
        java.sql.Time ent = new java.sql.Time(System.currentTimeMillis());
        return ent.toString();
    }
}

Related

  1. getCurrentSQLDate()
  2. getCurSQLDate()
  3. getCurSQLDateInString(String pstrDateFormat)
  4. getDataMaior(java.sql.Date data1, java.sql.Date data2)
  5. getDateAfter(Date date, Integer after)
  6. getDateAsString(int month, int date, int year)
  7. getDateFormat()
  8. getDateFormat(java.util.Date date)
  9. getDateString(String date)