Working with adf dates programatically
Get Current Date and time We usually need to get current date and time in java class. It is easy to get current date for java.util.Date class. 1 java.util.Date date = new java.util.Date(); This date object gives current date and time. To use this date and time this can be formatted in needed date format as follows: 1 2 3 DateFormat dateFormat = SimpleDateFormat( "yyyy/MM/dd HH:mm:ss" ); java.util.Date date = new java.util.Date(); String datetime = dateFormat.format(date); This will give desired format to current date. Now to use this format in code we need to change this string to java.util.Date 1 2 3 4 try { java.util.Date date2 = dateFormat.parse (datetime); } catch (Parse...