February 04, 2013

Java simple Date format example



How to parse date in simple date format


package

BlackBery;

import

java.text.SimpleDateFormat;

import

java.util.Date;

/**
* formatting a date in java examples
*/


/**
*

@author BlackBerry

*
*/
public

class ParsingDate {
/**

*

@param args 2010-11-12

*/

public static void main(String[] args) {
// TODO Todays days formating

SimpleDateFormat s = new SimpleDateFormat("yyyy-MM-dd");
System.out.println(" Date for blackberry application : "+s.format(new Date()));
}
}




Facebook comments