Java Time Now getCurDateBefore(long time)

Here you can find the source of getCurDateBefore(long time)

Description

get Cur Date Before

License

Open Source License

Declaration

public static String getCurDateBefore(long time) 

Method Source Code

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

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    /** The Constant YYYY_MM_DD_HH_MM_SS. */
    public static final String YYYY_MM_DD_HH_MM_SS = "yyyy-MM-dd HH:mm:ss";

    public static String getCurDateBefore(long time) {
        SimpleDateFormat sdf = new SimpleDateFormat(YYYY_MM_DD_HH_MM_SS);
        return sdf.format(new Date().getTime() - time);
    }//from   www.  ja v  a 2s .  co m
}

Related

  1. currentTimeStr()
  2. currentTimeString()
  3. currentTimeString(String pattern)
  4. currtimeToString8()
  5. get_cur_datetime()
  6. getCurDateTime()
  7. getCurDateTIme()
  8. getCurentTimeDirsPath()
  9. getCurrDateTime()