Saturday, March 5, 2011

Java - Getting current time and date

private String getDateTime()  {
        DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss");
        Date date = new Date();
        return dateFormat.format(date);

Date currentDateAndTime = getDateTime();


Post a Comment

Contact Form


Email *

Message *

The Insane Techie - Android App

Launched an android app for the blog on 07th June 2016. Get it from google play store... Tips for using the app Use in landscape mo...