Convert Calendar To long - Android java.util

Android examples for java.util:Calendar

Description

Convert Calendar To long

Demo Code

import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class Main{

    public static Long CalendarTolong(Calendar c) {
        if (c != null)
            return c.getTimeInMillis();
        return null;
    }/*from w w w.jav  a2  s.  c o  m*/

}

Related Tutorials