Answers for "time format android"

2

android java format date time

import java.time.*;
import java.time.format.*;
DateTimeFormatter formatter = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
LocalDateTime datetime = LocalDateTime.now();
String output = formatter.format(datetime);
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