get Last Seven Days Start In Milliseconds - Android java.util

Android examples for java.util:Millisecond

Description

get Last Seven Days Start In Milliseconds

Demo Code


//package com.java2s;

import java.util.Calendar;

public class Main {
    private static final long dayInMilli = 86400000;

    public static long getLastSevenDaysStartInMilli() {
        Calendar cal = Calendar.getInstance();
        return cal.getTimeInMillis() - (dayInMilli * 7);
    }/*from  w  ww. j  a  v a 2s  .  c  o m*/
}

Related Tutorials