Java Format - Java DateFormat FULL








Syntax

DateFormat.FULL has the following syntax.

public static final int FULL

Example

In the following code shows how to use DateFormat.FULL field.

import java.text.DateFormat;
import java.util.Date;
import java.util.Locale;
//  w w w  .ja va2 s  . c o  m
public class Main {
  public static void main(String[] argv) throws Exception {

    String s = DateFormat.getTimeInstance(DateFormat.FULL, Locale.CANADA).format(new Date());
    System.out.println(s);

  }
}

The code above generates the following result.