get Date Now - Android java.util

Android examples for java.util:Date

Description

get Date Now

Demo Code

import android.content.Context;
import android.text.format.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
import java.util.TimeZone;

public class Main{

    public static Date getDateNow() {
        Calendar cal = Calendar.getInstance();
        return cal.getTime();
    }/*from  w  w w .  j  a va  2 s . c o  m*/

}

Related Tutorials