Skip to content

Instantly share code, notes, and snippets.

@malikkurosaki
Created October 24, 2019 08:07
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malikkurosaki/c774e87f0c46b0f8107e9542d90f96b2 to your computer and use it in GitHub Desktop.
Save malikkurosaki/c774e87f0c46b0f8107e9542d90f96b2 to your computer and use it in GitHub Desktop.
android mendapatkan waktu date time

android mendapatkan date time wakru

private String getDateTime() {
        SimpleDateFormat dateFormat = new SimpleDateFormat(
                "yyyy-MM-dd HH:mm:ss", Locale.getDefault());
        Date date = new Date();
        return dateFormat.format(date);
}
return new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(new Date());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment