Java Minute Calculate getTimeInDate(int offSetInMinutes)

Here you can find the source of getTimeInDate(int offSetInMinutes)

Description

get Time In Date

License

Open Source License

Declaration

public static String getTimeInDate(int offSetInMinutes) 

Method Source Code

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

import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;

public class Main {
    public static String getTimeInDate(int offSetInMinutes) {
        DateFormat dateFormat = new SimpleDateFormat("dd/MM/yyyy HH:mm:ss");
        Date dNow = new Date();
        Calendar calendar = Calendar.getInstance();
        calendar.setTime(dNow);//from   w  w  w . j a va 2 s  .  c  om
        calendar.add(Calendar.MINUTE, offSetInMinutes);
        dNow = calendar.getTime();

        return dateFormat.format(dNow);
    }
}

Related

  1. getForwardTimeByMinute(int minute, String format)
  2. getFutureDate(int _minutes)
  3. getIntevalMinutes(String startDate, String endDate)
  4. getTime(int minuteDelt)
  5. getTimeAddMinute(String time, int minute)
  6. getTravelTimeinMinutes(String startTime, String endTime)
  7. minusMinutes(String s, long minutes)
  8. minuteBetween(Date smdate, Date bdate)
  9. minutesBetween(String from, String to, String format)