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

Android examples for java.util:Millisecond

Description

get Last Thirty 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 getLastThirtyDaysStartInMilli() {
        Calendar cal = Calendar.getInstance();
        return cal.getTimeInMillis() - (dayInMilli * 30);
    }/*from   w  w w. j  a va2 s . c om*/
}

Related Tutorials