Here you can find the source of getTodaysDate()
public static String getTodaysDate()
//package com.java2s; /**/* ww w. java 2 s.co m*/ * Copyright (c) 2013 Acrylic Goat Software * * This software is subject to the provisions of the GNU Lesser General * Public License Version 3 (LGPL). See LICENSE.txt for details. */ import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Date; import java.util.Locale; public class Main { public static String getTodaysDate() { DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy", Locale.US); Date date = new Date(); String today = dateFormat.format(date); return today; } }