Answers for "android dateformat examples"

2

android java format date time

import java.time.*;
import java.time.format.*;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd");
LocalDate date = LocalDate.now();
String output = formatter.format(date);
Posted by: Guest on February-05-2021
2

android java format date time

import java.time.*;
import java.time.format.*;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("HH:mm:ss");
LocalTime time = LocalTime.now();
String output = formatter.format(time);
Posted by: Guest on February-05-2021

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language