Tag - java

Java Program – Basic Date Formatting

Basic Date Formatting Let us see an example for Basic Date Formatting. package com.ack.j2se.date; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class BasicDateFormatting { public static void main( String[] args ) throws Exception { // get today's date Date today = Calendar.getInstance().getTime(); // create a short version date formatter DateFormat shortFormatter = SimpleDateFormat.getDateInstance( SimpleDateFormat.SHORT ); // create a long version...