All about studying for a Java interview in the Financial and trading services industry. I am a software engineer working with trading systems. 20 years experience coding and all things IT.
Sunday, June 15, 2014
‘SimpleDateFormat’ - use it to display the current system date in ‘yyyy/MM/DD HH:mm:ss’ format?
public class CurrentSystemDate {
public static void main(String[] args) {
SimpleDateFormat sysForm = new SimpleDateFormat("yyyy/MM/DD HH:mm:ss");
Date curdate= new Date();
System.out.println(sysForm.format(curdate));
}
}
No comments:
Post a Comment