« powrót

Funkcja zwracajaca bieżącą date jako string [Java]

Opublikowano: 2009-11-07 , wyświetlono: 17856


public String currentDateStr()
{
  String currDate;

  DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
  java.util.Date date = new java.util.Date();
  currDate = dateFormat.format(date);

  return (currDate);
}


Komentarze: