How To Get Current Date Time In Android

[Solved] How To Get Current Date Time In Android | Java - Code Explorer | yomemimo.com
Question : how to get current date time in android

Answered by : santosh-pal

Calendar c = Calendar.getInstance();
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
String strDate = sdf.format(c.getTime());
Log.d("Date","DATE : " + strDate)

Source : | Last Update : Fri, 05 Mar 21

Question : android java get current date

Answered by : paul-smith-h1kxhourr6fx

import java.time.*;
LocalDate date = LocalDate.now();

Source : | Last Update : Fri, 12 Feb 21

Question : how to get system date in android

Answered by : blushing-buzzard-95xmfn93jfvs

String date = new SimpleDateFormat("yyyy-MM-dd", Locale.getDefault()).format(new Date());

Source : https://stackoverflow.com/questions/8654990/how-can-i-get-current-date-in-android/15698784 | Last Update : Mon, 21 Sep 20

Question : how to get current date time in android

Answered by : santosh-pal

String currentDateTimeString = java.text.DateFormat.getDateTimeInstance().format(new Date());
// textView is the TextView view that should display it
textView.setText(currentDateTimeString);

Source : | Last Update : Fri, 05 Mar 21

Question : android java get current time

Answered by : paul-smith-h1kxhourr6fx

import java.time.*;
LocalTime time = LocalTime.now(); 

Source : | Last Update : Fri, 12 Feb 21

Question : android java get current time

Answered by : paul-smith-h1kxhourr6fx

import java.time.*;
LocalDateTime datetime = LocalDateTime.now(); 

Source : | Last Update : Fri, 12 Feb 21

Question : how to get current date time in android

Answered by : santosh-pal

 SimpleDateFormat sdf = new SimpleDateFormat("ddMMyyyy_HHmmss", Locale.getDefault()); String currentDateandTime = sdf.format(new Date()); System.out.println("currentDateandTime" + currentDateandTime);

Source : | Last Update : Fri, 05 Mar 21

Question : how to get current date time in android

Answered by : santosh-pal

import java.util.Calendar
Date currentTime = Calendar.getInstance().getTime();

Source : | Last Update : Mon, 08 Mar 21

Question : How to get current time and date in Android

Answered by : belaid-nacereddine

import java.util.Calendar Date currentTime = Calendar.getInstance().getTime();

Source : https://androidandrey.com/ | Last Update : Thu, 18 Aug 22

Question : how to get date android studio

Answered by : dead-dugong-c7rzxvpxshxr

import java.util.Calendar;
import java.util.Date;
Date currentTime = Calendar.getInstance().getTime();

Source : https://stackoverflow.com/questions/5369682/how-to-get-current-time-and-date-in-android | Last Update : Mon, 24 Oct 22

Answers related to how to get current date time in android

Code Explorer Popular Question For Java