Search
 
SCRIPT & CODE EXAMPLE
 

JAVA

how to get current date time in android

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)
Comment

android java get current date

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

how to get date android studio

import java.util.Calendar;
import java.util.Date;

Date currentTime = Calendar.getInstance().getTime();
Comment

how to get current date time in android

String currentDateTimeString = java.text.DateFormat.getDateTimeInstance().format(new Date());

// textView is the TextView view that should display it
textView.setText(currentDateTimeString);
Comment

how to get current date time in android

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

how to get current date time in android

import java.util.Calendar

Date currentTime = Calendar.getInstance().getTime();
Comment

PREVIOUS NEXT
Code Example
Java :: how to find the highest power of 2 that divides a number? 
Java :: java int to hex 
Java :: print line in jjava 
Java :: change java version maven 
Java :: parallel sorting in java 8 
Java :: java how to override a private method 
Java :: how to initialize an array in java 
Java :: reverse sentence in java 
Java :: find if a value is in a 2d array java 
Java :: java set label color 
Java :: spring boot logged in user 
Java :: json date format for localdate java 
Java :: install java 8 on windows 10 
Java :: java save file 
Java :: java alert box 
Java :: java sout two dimensional array 
Java :: java scanner input float 
Java :: isinstance java 
Java :: java how to find the largest number in an arraylist 
Java :: how to crate an array of integers in java 
Java :: how to do stuff with a scoreboard minecraft 
Java :: java logger error 
Java :: how to find the average in an arraylist 
Java :: how to hide menu items in android 
Java :: java insert into arraylist 
Java :: concatenate two arrays java 
Java :: install java debian 8 
Java :: java get file from url 
Java :: java copy array 
Java :: java bigdecimal check less zero 
ADD CONTENT
Topic
Content
Source link
Name
5+8 =