Format a date with yyyy.MMMMM.dd GGG hh:mm aaa in Java
Description
The following code shows how to format a date with yyyy.MMMMM.dd GGG hh:mm aaa.
Example
// www. j a v a 2 s.c om
import java.text.SimpleDateFormat;
import java.util.Date;
public class Main {
public static void main(String[] argv) {
SimpleDateFormat f = new SimpleDateFormat();
System.out.println(f.format(new Date("yyyy.MMMMM.dd GGG hh:mm aaa")));
}
}
The code above generates the following result.