get Current day value in dd format - Android java.util

Android examples for java.util:Day

Description

get Current day value in dd format

Demo Code

import android.annotation.SuppressLint;
import java.text.SimpleDateFormat;
import java.util.Date;

public class Main{

    public static String getCurrentDd() {
        return new SimpleDateFormat("dd").format(new Date());
    }//from ww  w .j  a  v  a2 s.co m

}

Related Tutorials