Java tutorial
//package com.java2s; import java.util.Calendar; public class Main { public static String getCurrentData() { Calendar c = Calendar.getInstance(); return "" + c.get(Calendar.YEAR) + c.get(Calendar.MONTH) + c.get(Calendar.DAY_OF_MONTH); } }