Afficher Date et l’heure en format complet

Author:

Afficher,Date,et,l'heure,en,format,complet
{filelink=5595}


import java.text.SimpleDateFormat;
import java.util.Date;

public class FormatComplet
{
  public static void main(String[] argv) throws Exception
  {

    Date date = new Date();
    SimpleDateFormat dateFormatComp;

    dateFormatComp = new SimpleDateFormat("dd MMM yyyy hh:mm:ss a");
    System.out.println(dateFormatComp.format(date));

  }
}

Leave a Reply

Your email address will not be published. Required fields are marked *