Java Timestamp Field getOffsetDaysTime(Timestamp sysDate, int offsetDays)

Here you can find the source of getOffsetDaysTime(Timestamp sysDate, int offsetDays)

Description

get Offset Days Time

License

Apache License

Declaration

public static Timestamp getOffsetDaysTime(Timestamp sysDate, int offsetDays) 

Method Source Code


//package com.java2s;
//License from project: Apache License 

import java.sql.Timestamp;

import java.util.Calendar;

public class Main {

    public static Timestamp getOffsetDaysTime(Timestamp sysDate, int offsetDays) {
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(sysDate);/*from w  w w .  ja  v a 2 s  . c om*/
        calendar.add(Calendar.DAY_OF_MONTH, offsetDays);
        return new Timestamp(calendar.getTimeInMillis());
    }
}

Related

  1. getNextTimestamp(Timestamp previous, long nrDays)
  2. getNotNullTimestampValue(String timestamp, String format)
  3. getNowTimestamp()
  4. getNowTimeStamp()
  5. getNowTimeStamp()
  6. getPerformanceTime(Timestamp startTime)
  7. getPeriodExpiration(Timestamp tsStartDate, int iPeriodType, int iPeriodDuration)
  8. getPresentTimeStamp()
  9. getRandomTimeBetweenTwoDates(Timestamp beginDate, Map context)