Monday, 17 December 2012

Selenium TimeStamp

import java.util.Calendar;
import java.text.SimpleDateFormat;
public class TimeStamp {
  public static void  main(String arg[]) {
  Calendar currentDate = Calendar.getInstance();
  SimpleDateFormat formatter=
  new SimpleDateFormat("yyyy/MMM/dd HH:mm:ss");
  String dateNow = formatter.format(currentDate.getTime());
  System.out.println("Now the date is :=>  " + dateNow);
  }
}

No comments:

Post a Comment