Android Time Get getDateTime()

Here you can find the source of getDateTime()

Description

get Date Time

License

Apache License

Declaration

public static String getDateTime() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;
import java.util.Date;

import java.util.Locale;

public class Main {
    public static String getDateTime() {
        SimpleDateFormat dateFormat = new SimpleDateFormat(
                "yyyy-MM-dd HH:mm:ss", Locale.getDefault());
        Date date = new Date();
        return dateFormat.format(date);
    }/*from   www.  j  a  va2  s  . co m*/
}

Related

  1. getNow()
  2. now()
  3. getCompactTime()
  4. getCurrentEpochTime()
  5. getCurrentTime()
  6. getLongTime()
  7. getRequestTime()
  8. getSystemTime()
  9. getTime1()